platform icon indicating copy to clipboard operation
platform copied to clipboard

Listener not compatible with Select ->multiple() option

Open milovanderpas opened this issue 2 years ago • 3 comments

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)

milovanderpas avatar Sep 28 '23 15:09 milovanderpas

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

vitortoigo avatar Apr 11 '24 18:04 vitortoigo

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[]">.

tabuna avatar Apr 11 '24 23:04 tabuna

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.

vitortoigo avatar Apr 12 '24 00:04 vitortoigo