Bug with select->multiple(), other ->live() components and $get()?
Hi,
I have this component added to the form:
And then I have various components with ->live() on them which uses $get() and $set() on the form.
This all works fine with a regular Select, but when adding ->multiple() to the select the form breaks because $get('some_value') will return null. If I remove ->multiple() from the select again I get the values.
This happens when you interact with the select, removing or adding users for instance.
I'm wondering if anyone else has experienced this and if it might be a bug.
5 Replies
Is the relationship
BelongsToMany
?
https://filamentphp.com/docs/3.x/forms/fields/select#integrating-with-an-eloquent-relationshipyes
Does it work?
yes, that code works fine. The issue is that i clears the state of the other ->live() components .. or rather, doesn't clear them in the UI but if I do $get('some_state') after interacting with the users select that other state returns 'null'
maybe you could share the whole code