filament-tree icon indicating copy to clipboard operation
filament-tree copied to clipboard

EditAction::isModalHidden does not exist

Open naingwin opened this issue 1 year ago • 1 comments

Filament version 3 Tree version 2.0.8

When click on edit action or delete action, I got following error.

Screenshot 2567-03-13 at 15 48 09

naingwin avatar Mar 13 '24 08:03 naingwin

I found a different(cheap way) solution. Create a new class for extending the edit action of the package.

use SolutionForest\FilamentTree\Actions\EditAction;

class EditTreeAction extends EditAction
{
    protected \Closure|bool|null $isModalHidden = false;//For example if you want getter setter you can add whatever you want.

    public function isModalHidden(): bool|\Closure|null
    {
        return $this->isModalHidden;
    }
}

After creating the class go to your tree-view page and add the example at below

    /**
     * @return EditAction
     */
    protected function getEditAction(): EditAction
    {
        return EditTreeAction::make();
    }

it will fix the issue.

brkfun avatar Mar 24 '24 02:03 brkfun

In version 2.1.0, we have added back this logics. Please upgrade to the latest version and check if the issue you were experiencing still occurs.

cklei-carly avatar Aug 05 '24 10:08 cklei-carly