Change select value on change event
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3557989. -->
Reported by: [hydra](https://www.drupal.org/user/647364)
Related to !181
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>It seems that tagify also has a change event which is not used by this modules integration. There is an "add" and a "remove" event which makes sure the value from the hidden field is passed to the native select element, so that drupals natural form submission behavior is compatible. But tagify also triggers a change event, which happens when clicking on the label (default selection). Since this is not implemented, the value is not getting changed on form submission since it did not get synced to the select element.</p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<p>- Create a simple form like a config form which uses tagify_select element<br>
- Provide a default value for that element<br>
- Now when in the form, don click on the "x" nor the chevron to open the select, click on the label (the visible default option)<br>
- Tagify opens as usual, select another value<br>
- Submit the form, the select's form element value in FormState did not change</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>- Implement the change event and sync the fields</p>
issue