ChesterS
Is it possible to make a custom action behave/look like as submit button?
Sorry if the title makes no sense.
When you upload files to a filament form, the 'submit' button changes (The label changes to 'Uploading files...', the button gets disabled and a loading indicator is added)
Is it possible to have the same behaviour with a custom action?
The only thing I managed to do is disable the button with a custom attribute
Is there a way to get the rest of the functionality? (change the label, add a loading indicator etc)
4 replies
Save form from a header action
Is it possible to save a form from a header action (or before a header action?
Let's say I have the following header actions in an edit form
Is there a way to submit the form before any of those actions is executed? Or somehow submit it inside the button action itself?
I tried this but it doesn't work
Or if there's a way to detect if a form has been changed and then ask for a confirmation to save before proceeding? Any ideas are welcome.
10 replies
Can you access the search state in a create action?
Sorry if the title doesn't make much sense
I have a select like this
Is there a way to access what the user has typed in the select to be used as a default value in the
createOptionForm
?
$component->getState()
is null12 replies
Resource visible in sidebar even if `viewAny()` returns false
As per title, I have a resource that's only available to certain users.
According to the docs here https://filamentphp.com/docs/3.x/panels/resources/getting-started#authorization the link should not be visible if they don't have access to it. However, that's not the case for me. They can still see the link but they get a 403 when trying click on it (as expected)
The navigation menu is build 'manually'
(not sure what else I need to provide. The resource itself is as boilerplate as it gets)
When I put a breakpoint in the
viewAny()
call in the policy, it looks like it's never hit.
Am I missing something or doing something wrong?13 replies
Register Filepond Plugin
There is a similar post here : https://discord.com/channels/883083792112300104/1151432989276913674
Is there a way to register a plugin for FileUpload without overriding the whole thing?
I've tried all the solutions mentioned in the above thread - except for the suggestion to override the entire
file-upload.js
file.
Here are some of the things I tried.
None of the above work for different reasons (obviously, I may be doing something wrong).
One of the problems is that the filepond stuff is loaded only when needed so it's not always available.
So, is there a way to install FilePond plugins ?
Thank you.2 replies
Show Filament notification when database notification is received
Is there a built in way to render/show a Filament notification when a database notification is received?
For example let's say I have this code
Is there a built-in way to actually render that notification when
$someUser
receives it? So they would see the equivalent of
If not, is there a callback or some sort of hook/event that's triggered so I can do this manually?
Thank you.5 replies
URL not working in repeater action?
For some reason, using the
url(...)
method doeson't work. The generated $wire.target=
is empty and as a result throws a console error
Am i doing something wrong? The URL is obviously correct since it works when I manually redirect()
to it.2 replies
Vite manifest not found when registering custom asset and deploying to production
I have a weird issue when trying to deploy to production.
I have a custom asset loaded using
However, during composer's
post-autoload-dump
the following commands are executed
both of which fail because the Vite manifest hasn't been generated yet.
The manifest is generated when I ran npm run build
but I can't do that because this fails if I haven't installed the composer dependencies yet.
So I'm in this weird catch-22 where the composer step fails because I can't build the Vite manifest, and I can't build the Vite manifest because the composer step fails.
Removing the FillamentAsset::register...
code solves the issue but it's obviously not a solution so I wonder if I'm missing something.
I use Forge/Envoyer for the deployments so most steps are vanilla Envoyer stuff. All of it worked untill I wanted to load a custom asset.
The manifest is not commited into the repo BTW. Am I supposed to commit it?35 replies
Enable Echo.js without breaking Hot Reload
Ok I'm at my wit's end here... I know this is probably not strictly Filament related, but maybe there's a JS wizard here that can help
I'm trying to enable broadcasting. Here are the relevant files
As you can see, most of the code is boilerplate. It works when I run
npm run build
, but when I run npm run dev
I get the following error.
in firefox and
inside the echo.js
file
Has anyone run into something similar? Any suggestions? Googling for this error doesn't get me anything useful.5 replies
Load custom component inside action modal
Ok I think I'm missing something obvious here, but is there a way to load a custom Livewire component inside a modal action?
Here's an example of what I've tried
but it doesn't work (the modal is empty)
This is what my component looks like
9 replies
Create action with relation throws error
Sorry for the vague title
I have the following action
When I click on the button, I get the following error
This is the exact same form I use in the
UserResource
and it works when creating a new user, but for some reason doesn't work when doing it outside the resource. I tried adding
and some other things but nothing worked. What am I doing wrong?5 replies
Refresh Filament component from a custom one
I have the following infolist
Is there a way to trigger the infolist to update from inside
MyCustomComponent
?
I can listen for an event inside the my filament ViewRecord
class, but I'm not sure how to trigger the actual update/refresh. I'd rather avoid a full page reload.
Ideally, I would have the same behaviour actions have (eg only the infolist is updated)5 replies
toggleable() not working with Split?
I have the following table columns
However, the column is always visible. When I click on the on the checkbox to toggle its visibility, the only thing that changes is that the option disappears from the sorting dropdown.
If I remove the
Split::make()
part and only have the columns, it works as expected
Is toggleable()
not compatible with Split
or am I doing something wrong?8 replies
Apply filters button + Filters as a slide-over
2 questions really
1) I remember there was a PR that added an
Apply
button to filters so the table was only filtered when you clicked the button and not when the filters where changed. Do I remember correctly?
2) How do I show the table filters in a slide-over? I set the layout: FiltersLayout::Modal
but how do I change it to a slide over?7 replies
Custom `target` attribute in link Action
Not sure if this is an IBKAC but I can't set a custom
target
on a link Action.
Here is the code
For some reason, the target
attribute does not appear but anything else seems to work.
Am I missing something? Is the target
attribute filtered for some reason?
(I don't want to use openUrlInNewTab()
since I don't want to open it in a new tab)4 replies
`visible()` doesn't resolve record
I have the following Table
Which throws the following error
Am I missing something? It doesn't matter what type of column I use BTW, when I pass a closure to the
visible
method, it doesn't pass he record as expected.
Everything is up-to-date (LW 3.3, Filament 3.1.23)7 replies