F
Filamentβ€’3mo ago
Bartek

Is it possible to put action form input field next to action button in a table row?

I would like to have form input field displayed in table row next to action button in filament instead of opening up a modal. Is that possible with filament currently?
10 Replies
Myo Zin Kyaw
Myo Zin Kyawβ€’3mo ago
If the form input used as repeater, there is a package table repeater
Bartek
Bartekβ€’3mo ago
I'm looking for way to put input fields in relation manager table next to action buttons in rows
dissto
disstoβ€’3mo ago
Bartek
Bartekβ€’3mo ago
like an inline mini form so I don't open modal can I hook text input column to respond to table action defined in $table->actions() ?
dissto
disstoβ€’3mo ago
Not sure what you mean by that. The text input column directly changes a column in your db πŸ€” Can you elaborate?
Bartek
Bartekβ€’3mo ago
so i dont want to change column directly. I want empty input field where i can fill it in with desired amount that needs to be either removed or added to transaction. there are two custom actions add and remove as there is bunch of code that needs to run before amount is being removed or added to total (logging and validation). currently it is based on buttons opening up a modal with form input field where user can enter amount. I would like to move that input field to row next to action buttons
dissto
disstoβ€’3mo ago
I suppose you could maybe hack something with the text input column...but its a very limited type of component...and by default its state is directly tied to the column... though why are you not using a form for you action? you are way more flexible with that. the action with a form is probably way more suited for that anyway...since there is no extra step for the input column, it will just update the value...
Bartek
Bartekβ€’3mo ago
can that action with form display in a row? I'm trying to skip the need for modal popup as it has only one input field inside and really defies the purpose. I wish there was a way to plop form input field down inline next to its action in a table row.
dissto
disstoβ€’3mo ago
Yea im not sure if there is an easy built in way...perhaps a custom column...but i dont think thats worth the effort... maybe you can hack it with a temporary column in your db...im just brain storming.. "amount_to_be_added" you can use the text input column...and it your action after you have run you could reset that "amount_to_be_added" to null again...but thats a little silly...i would just go with the form on the action πŸ€“
Bartek
Bartekβ€’3mo ago
agree if there is no possibility of directly placing action form input field inline on the table row all other solutions sound too complex for what its worth ...
Want results from more Discord servers?
Add your server