Hugo
Modal Footer Action closes modal ,opens another modal then reset arguments
Hello. I am trying to have an action create a temporary record and then open another modal to fill extra data.
So far I've made it work like so
This second modal that is an row action on my table, will change it's form depending on the $arguments (whether is comes from a previous modal or if the users click on the row action).
My problem now is that after submitting the second action modal form, I would like to reset the arguments of the action (so that if the user clicks on the row action, the form is the default one). These arguments were set above:
on the second action, on the ->action method, i've tried to $action->resetArguments(); or even $livewire->getMountedTableAction()->resetArguments(); and after dumping the arguments they appear to have been reseted but when I press on the row action, the form still has the same format as if it still has $arguments. This behavior only changes after refreshing the page, but I would like to avoid it and have it dynamically change.
I've thought about other solutions like creating an hidden action with that specific form but I would like to know if there is a way to do what i am trying to.
2 replies
Export Action logs me out
Hello, I've tried getting help here before about this issue and I got no response so I am trying once again 😄 .
When I'm using an export action and I try to export data from a table, it used to expired my session and log me out of my app. I fixed the part where it would expire my session but now when I try to export, it just logs me out of my application and when I log in again, the exported data is in the notification bell ready to download.
Does anyone know why is this happening and how can I fix this issue?
I thought it could be due to large chunks of data but it also happens when exporting 10 records.
Can anyone help me?
Thank you.
2 replies
Import / Export Session expired & logout - Export with random table info.
Hello.
I've been having this issue for a while now.
When I use the Export Action, in some cases, my session gets expired.
I solved this issue by adding in the VerfifyCsrfToken middleware.
Although the issue of getting my session expired is solved, it now logs me out of the app. The export is still in the notifications and ready to download, but why does it log me out of my own app when pressing an export action?
Another issue I've been having with the export action is the fact that the files come with some random data from other tables.
4 replies
Dynamic columns on Importer class
Hello, I am trying to create dynamic columns on my importer classes. I tried using importer options and passing in a client, because clients may have different columns than others. Some columns are always the same for every client but some have other types of columns. My goal was to pass in the client through the options and then loop through the extra columns of the specific client and create the ImportColumns in a dynamic way. What i found out was that I can't access $options in the getColumns method. is there a way to do this?
10 replies
prevent ->searchable(isIndividual:true) from hiding when no records found
Hello, is there a way to prevent the individual column search from hiding when there is no record that matches the search? I would like it to persist even though there was no record found so i could just backspace instead of having to remove the filter by hand.
2 replies
Send variables to the Exporter
I've got a resource with a table. I have a history table action which opens up a modal with several tabs with tables (several types of history from the selected record) inside. In the header of each table I wan't to add an ExportAction but i'd like to send through some variables (like the selected $record from the first table) so that I can have a column on the exporter just for that variable (yes the column will always have the same value).
To give you proper context.
You have a piece of clothing.
You want to see the washing history that happened on that piece of clothing.
Each washing process saves in a json column all the clothes it washed.
To see through the history of a certain clothing, im retrieving all washing processes, getting all the articles it washed and compare them with the clothing $record i selected and then saving every washing process id. Then on the table im just showing the washing processes which id I saved.
So the clothing piece has no direct relationship with the washing process.
How can I send the $record variable (which is my clothign piece) to the exporter so that I can have a column with that information to export?
8 replies
ExportAction on big amounts of rows.
Hello, im currently having a problem using ExportAction on a table with 50k rows. Upon trying, my session just expires and it logs me out of the app. I've tried playing around with the chunkSize as explained in the docs but to no success. Is there a workaround or a way to make this work? It generates the file still but the page keeps expiring.
2 replies
sticky table header
Hello, I've searched this question here and all the solutions did not work, they did do something but not what I expected. I would like to know if anyone has implemented or has a solution for a sticky header on the tables. When scrolling down I would like the table header to follow through. Anyone?
6 replies
Prevent Individual search fields from hiding when no results
Is there a way to prevent the individual searches on a table to hide when I get no results ? I say this because it is kinda annoying to have to go and press to clear filters when I could simply just backspace, just like it is in the global search.
2 replies
Testing - how can i test if a from from a suffix action has a certain field?
Hello, im making tests on a form which has fields that have suffix actions.
Im struggling trying to check whether a certain field is present in the form after I go into the suffix action.
it asserts Successfully that the "open-modal" event was dispatched and It also asserts successfully that the label of my field is being shown.
From this I know that im indeed in the modal.
The problem im facing now is that I can't assert if a certain field exists because it says the form does not exist.
This is what I have:
This last line is what is giving me errors, it says that the mountedFormComponentAction does not exist. Any help?
2 replies
Render hook not working for 'panels:sidebar-nav.start'
Hello, Im trying to add a search option on top of my sidebar. For it, im tryng to render the following hook:
`
this is in my AdminPanelProvider. I've rendered some hooks before and they are still working fine but I can't seem to be able to use this one.
I tried using the sintax presented in the docs "PanelsRenderHook::SIDEBAR_NAV_START"
https://filamentphp.com/docs/3.x/support/render-hooks#available-render-hooks, but is doesn't seem to work because apparently PanelsRenderHook doesn't exist.
Anyone with the same problem?
3 replies
Cannot press save changes button because of tabs in the form?
I am having a weird interaction in my edit form.
I have a few tabs in my form where those tabs show different tables.
For some odd reason, if I comment out those tabs or I just remove the table from the tab schema the save changes button works again.
Those tabs have nothing to do nor will save anything alongside the form, they just show different tables where you can manage visibility of certain records.
I'll follow up in the comments with code.
3 replies
How to dispatch an event from a Notification Action
I've been trying to dispatch an event from a Notification Action but it's not working.
using ->dispatch or ->dispatchSelf seems to do nothing.
I've searched around and tried to use ->action() and dispatch using $livewire->dispatch() but action seems to not work on notification Actions.
How can I rly dispatch an event from a Notification action?
Further down in my Resource, there's my method that is attempting to listen to the dispatch event but it never gets there.
Any Thoughts?
17 replies
Confirmation modal before action.
Im trying to show a confirmation modal after pressing the submit button.
At the moment it looks like this:
Adding an extraModalFooterAction and putting the submitAction to false could be a solution and i've tried it. The problem im running into is that I cant access the $data coming from the parent form.
If I could access that $data I could probably execute the action I want upon confirming.
What im looking for is:
I have the action that I posted with my form.
When I press the submit button I want a confirmation Modal to show.
Upon confirming that modal I want to execute the action with the $data from the form.
2 replies
[Tests] What's the way to fill a form that has a repeater ?
Im testing a relationManager and the create form has a repeater, im trying to fill the form with data but i'm having trouble filling the repeater.
I thought the right way to fill a repeater would be with a nested array, so that's what im feeding it with.
Upon running this test im getting
Any solution?
2 replies
[Testing] How to mount a table header action and make sure that the event was dispatched?
Im testing my application and currently testing a relation manager, but I'm having problems testing a table header action that creates a new record for that relation manager. It says that the event wasn't fired.
until the mountAction('create') the test run's fine but it then says it failed to assert that the event 'open-modal' was fired. Is there a way to test table header actions?
2 replies