pepperoni dogfart
Clickable row add to bulk select
Alright this is super hacky but I haven't found a better way yet (feel free to point and laugh 😆). Looking for some advise cause eventually I'd like to reference the selected rows to update a widget values. (I opened a separate help post about that one)
My goal was to change the default behavior on a table row so that when clicked, it simply selects it to be used for a bulk action instead of opening view/edit, etc.
Here's where it runs a bit astray. I'm sure there's some method to do this with alpine/livewire, what have you - direct in the Resource, but I wasn't able to figure it out. I instead created a new JS asset, imported in a provider as follows:
custom.js
It does work, mostly. Sometimes I'm not able to click them anymore when using table search for example, suspecting the DOM is updated and not reattaching this. Either way, this doesn't feel ideal - any suggestions or insight on a better way to obtain this same behavior?
3 replies
Selected records to widget
I currently have a Stat widget dispalyed on a resource. Is there a way to pass in what records are selected via the checkmark on Bulk Actions to the widget?
The goal is to dynamically update the widget data based on the rows that are selected.
I've been playing around with this for a bit and haven't been able to figure it out. From my github searching, I found "livewire->getSelectedTableRecords()" might be useful here, but I'm not positive how to pass that to the Stat widget.
7 replies
Tabs Blade component, active state in foreach
I'm not super versed in alpine but I am struggling to figure out why the :active property wouldn't be working here. The tabs show up fine with correct labels and switch properly - but it appears all the tabs are all showing in the active state. I've tried a quite a few variations and haven't been able to get any of them to work properly.
4 replies
Registration - Password Requirement
Durign a new user signup, is there a place to modify the requirements for the password field?
I'm using the Breezy plugin which allows setting such things on the profile update once logged in, but not for the initial signup.
13 replies
Repeat table column
I have a hasMany relationship that I'd like to dynamically add to a filament table based on each relationship found, is this possible?
For example in my model, I have
I basically want to do a foreach in the filament table, somehow, to make a TextColumn on each one.
3 replies
Select field using search populate another field.
I have a select field that populates the options via an external API request:
How can I pass the selected result over to the TextInput field? I couldn't figure this out using
afterStateUpdated
with the getSearchResultsUsing
method on the original field.4 replies
Filters - setting opposite when unchecked
Hello, I have a column in the database for "complete" in a basic task list. By default when I view the table, I'd like it to display by default all tasks where complete = false.
I was able to add a filter toggle in to show completed tasks, but having an issue figuring out when it's not toggled, those records would be hidden.
2 replies
Access model data on delete action
I have an odd use case where my model is a remote API resource via calebporzio/sushi. Everything is working great from editing, creating, viewing -- but not deleting. For editing I'm utilizing
EditAction::make()->using
which references a method on my model that performs the update via API.
For delete however, I can't find a way to pass any data of the actual model being deleted so that I can facilitate this on my own on the backend.
DeleteAction::make()->after()
does not appear to be passed the same $data
array as the EditAction
.
Can anyone think of a different way to go about accomplishing this?
Working:
Nothing passed:
22 replies
Switching from Nova to FIlament, questions on relation manager
When using relation manager, it looks like you have to re-create new/edit forms that may already be present on the relationship resource itself? Is there anyway when you click on a BelongsTo in the related table to simply use the form already created for that original resource instead of having to keep two separate copies of it?
Or better yet, the edit button will bring up the original edit page for that resource (same with new)? This is how it works on Nova anyway, just trying to wrap my head around it here.
16 replies