Applying native(false) to SoftDelete filter select field
Is this easy to do? What would be the best way?
11 Replies
Wouldn't it be this?
->modifyFormFieldUsing(fn (Select $field) => $field->native(false))
That's modifing the field, I don't think that'll cause it to apply.
what exacrtly are you trying to do? By default he fitler is applied without deleted records. So are you looking for with deleted records?
No I'm trying to make it not-native (the javascript instead of default browser select field)
Can provide your use case more? I'm not following, are you trying to trigger the fitler outside of the fitler?
I want to do this on the select field in the filter:
https://filamentphp.com/docs/3.x/forms/fields/select#enabling-the-javascript-select
Sorry, but if you are using a select filter, why not just use the native trashed filter? I'm struggling to understand what you are trying to achieve beyond what is baked in .
Oh I just added this and it's working now
This was a lot of overthinking lol. I thought it was different because it was a filter and not a standard field element
Result:
Hahaha that’s why I was struggling to understand what you were doing 🤣🤣