Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Listener not compatible with Select ->multiple() option #2717

Open
milovanderpas opened this issue Sep 28, 2023 · 3 comments
Open

Listener not compatible with Select ->multiple() option #2717

milovanderpas opened this issue Sep 28, 2023 · 3 comments
Assignees
Labels

Comments

@milovanderpas
Copy link

Describe the bug
When I make a listener and set a Select field as target that has the multiple() option on. Than the listener won't be triggered, when I remove the multiple() on the Select field the listener does trigger on change.

To Reproduce
Steps to reproduce the behavior:

  1. Create Listener
  2. Add Select field with the multiple() option enabled
  3. Set Select field as target
  4. Check if Listener trigger is called, when Select field is updated

Expected behavior
I expected that the listener would be triggered, when a selected one or more values from the Select field.

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Chrome
  • Version Latest

Server (please complete the following information):

  • Platform Version: 13.10.0
  • Laravel Version: 9.7
  • PHP Version: 8.1
  • Database: MySql
  • Database Version: 8.0 (I think)
@vitortoigo
Copy link

I have the same problem, has it been resolved somehow?

@tabuna
Copy link
Member

tabuna commented Apr 11, 2024

When referring to multiple values, it is necessary to add a "dot" at the end of the name. For example, options.. This is because in HTML, the multiple tag is written as <select name="options[]">.

@vitortoigo
Copy link

When referring to multiple values, it is necessary to add a "dot" at the end of the name. For example, options.. This is because in HTML, the multiple tag is written as <select name="options[]">.

Thanks for this, tabuna, working 100%.

For some reason, the listener dont enter in handle method, asyncMethod works normally, but I need to set the values with $repository->set so they don't reset every time a change is made.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants