-
Notifications
You must be signed in to change notification settings - Fork 70
fix: update PageBuilder for Filament v4 compatibility #244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 3.x
Are you sure you want to change the base?
Conversation
PR Summary
|
</x-slot> | ||
|
||
<x-filament::dropdown.list> | ||
<x-filament::grid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the component is still available, I think it's best we keep it until it's deprecated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about x-filament-schemas::grid
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This component no longer exists on filament v4 you must use a div instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
can always change back the grid component if needed
@Z3d0X ready for a release |
This PR updates the PageBuilder component to be compatible with Filament v4.
Change
Action Mounting
mountFormComponentAction()
withmountAction()
which is the correct method in Filament v4{ schemaComponent: '{$key}' }
instead of passing the statePath as the first argument$key = $getKey()
in the main page-builder template to provide the component key:key="$key"
prop to all block picker components (dropdown and modal variants)Component Updates
x-filament::grid
component with plaindiv
using Tailwind classes (grid gap-1
) in dropdown-block-pickerif ($afterItem)
toif (filled($afterItem))
for consistency with Filament conventionsBreaking Changes
None - this maintains backward compatibility while adding v4 support.
Additional Context
In Filament v4, the action mounting system changed from
mountFormComponentAction(statePath, actionName, arguments)
tomountAction(actionName, arguments, context)
where context is an object containingschemaComponent
key. This PR updates all block picker components to use the new API.