solutionforest / filament-tree

Filament Tree is a plugin for Filament Admin that creates a model management page with a heritage tree structure view. This plugin can be used to create menus and more.
MIT License
125 stars 43 forks source link

Fix is Modal is Hidden function #44

Closed raphaelcangucu closed 6 months ago

raphaelcangucu commented 6 months ago

The new Filament version don't have the function isModalHidden, so I added this code:

if (method_exists($action, 'isHidden')) {
            if ($action->isHidden()) {
                return false;
            }
        }

        if (method_exists($action, 'isModalHidden')) {
            if ($action->isModalHidden()) {
                return false;
            }
        }

On the trait HasAction to keep the compatibility with older or newer versions.

DanielMukh commented 6 months ago

Would love for this fix to get added!

luizantunescods commented 6 months ago

Good catch. That's exactly what I'm looking for.

raphaelcangucu commented 6 months ago

Not needed anyomore, the actual version fix it.