moonshine-software / moonshine

Laravel Admin panel and more. Simple for beginners and powerful for experts. Using Blade, Alpine.js and Tailwind CSS.
https://moonshine-laravel.com
MIT License
759 stars 100 forks source link

fix: FeatNFix pack #1185

Closed lee-to closed 2 months ago

lee-to commented 2 months ago
  1. Issue #1184 (Single image ->changeFile -> deleteFile)
  2. Tab uniqueId
Tabs::make([
  Tab::make('Tab 1', [
      ActionButton::make('Go to tab 2')->onClick(fn() => 'setActiveTab(`my-tab-2`)'),
  ])->uniqueId('my-tab-1'),

  Tab::make('Tab 2', [
       ActionButton::make('Go to tab 1')->onClick(fn() => 'setActiveTab(`my-tab-1`)'),
  ])->uniqueId('my-tab-2'),
]),
]),
  1. modifyForm/List/Detail
// ModelResource

public function modifyFormComponent(MoonShineRenderable $component): MoonShineRenderable
{
    return parent::modifyFormComponent($component)->fields([
        FlexibleRender::make('Top'),
        ...parent::modifyFormComponent($component)->getFields()->toArray(),
        FlexibleRender::make('Bottom'),
    ])->submit('Go');
}

public function modifyListComponent(MoonShineRenderable $component): MoonShineRenderable
{
    return parent::modifyListComponent($component)->customAttributes([
        'data-my-attr' => 'value'
    ]);
}

public function modifyDetailComponent(MoonShineRenderable $component): MoonShineRenderable
{
    return parent::modifyDetailComponent($component)->customAttributes([
        'data-my-attr' => 'value'
    ]);
}
  1. Fix import/exportFields getter
  2. Profile nullable value
  3. Table th empty actions