Masea
Can't listen to events on a custom field
I am dispatching event from an action that's inside an action form. The event is listened from a random method in the same resource form properly. But when I try to listen to it from the custom field in the same form it doesn't work. The custom field is like below:
the alert does not work. Any idea why? Thanks
1 replies
how to run javascript after clicking an action
I have an action that sets a field's value. The field is an hidden field which is responsible of only carrying the text value. In the same form, there is also an placeholder field, which is visible if the hidden field has set to a value and its content is set to display hidden field's value.
What i would like to achieve is that whenever a new value set for the placeholder to display, trigger a script. This script will be a simple animation.
Any idea how can i do this? Thanks!
4 replies
custom widget polling
I added a custom widget to one of my resource's edit page. I want it to be polled and I gave widget's view's root element a wire:poll attribute like this but it doenst work:
I would like to use stats widget since polling is in it. But I also need a button on my widget and afaik stat widgets do not support actions. Any idea?
2 replies
how can i put script on a widget blade view?
i am going to have a widget that will run a script on its view. but no matter where I put the script it didnt work. here's my code:
<x-filament-widgets::widget>
<x-filament::section>
</x-filament::section>
<script>
alert("hey")
</script>
</x-filament-widgets::widget>
any idea why? thanks. this is a custom widget btw and i am using it on a custom page
19 replies
textinputcolumn lifecycle hook stop the action
I have a table colum like above in my project. Inside beforeStateUpdated, can I halt the process so it won't save the value to the database? The code doesn't work by the way as $action parameter is not resolved. Thanks
2 replies
Updating another column if a column was dirty using observer results in stack overflow
This is my submit function of the form.
and this is the observer. When I submit the form, it goes into a infinite loop, idk why. Any idea to solve this? Thanks
1 replies
Adding filters to a Page and manipulating its widgets' content with them
Can I somehow add filters to a Page and then pass the filter values through a widget and use it inside the widget?
I am using the FullCalendar plugin and it is limited only to dates when it comes to filtering the calendar content. In this plugin, the calendar is contained inside a widget hence my question.
10 replies
multiple resources with the same policy leads to unwanted action when used with roles and permission
hey, can i somehow override the can method inside resource class to make the resource use different policy without knowing its model? because i have multiple resources that are tied to the same model.
as i see it, the current can method checks the policy tied to the model. but if you ask me, resource dependant policies make the most sense
i am dealing with this because i am using the shield plugin. even though it displays and lets me edit the permissions on a resource basis, it doesnt matter in the end of the day because all those resources are tied to the same model -_-
2 replies