Tagify add/remove event triggers when value is set through dynamic attributes

Wappler Version : 4.7.3
Operating System : W11
Server Model: NodeJS
Database Type: MySQL
Hosting Type: Custom

Expected behavior

Setting the value of a tagify text box when the page loads should not trigger the add/remove events.

Actual behavior

When setting the value (where the data is fetched from a server connect action) of a tagify text input through the value dynamic attribute, it fires the “Add” and “Remove” dynamic events. As such, whenever you load a page these actions are instantly triggered making them completely unusable if you are setting the value from a server connect.

I am assuming this is not intentional because it doesn’t happen with the Wappler “changed” event, but of course, you can’t use the tagify events on that.

I haven’t tested setting the value through other methods, but I assume this also triggers the events. Essentially, they should not be triggered when app connect sets the value initially, just like the changed event.

How to reproduce

  1. Create a tagify text input.
  2. Add the “Value” dynamic attribute and set the value to be data from a server connect.
  3. Add the “Add” and/or “Remove” events and make them trigger an alert (as an example).
  4. Load the page. The add/remove events will be triggered instantly without user input as Wappler sets the value.

Just bumping this, but any chance for a fix in this Thursdays update (if there is one)? This is quite an issue for me when working on replacing Select2 with Tagify.

Can’t you use the changed event, the add events are indeed always triggered when a tag is added to the control and this is by design.

With the tagify events you can get the last added/removed item which is what I need, I don’t think you can do this with the normal changed event? At least I couldn’t work out how.

Could we get some sort of toggle for these events as to if they are triggered when the value is set by a server action? I feel like there’s a real limited amount of things you can do with them, if this is by design.

Unfortunately there’s currently no way for us to know if the add event has been triggered by a user interaction or not. There’s no such info returned by the tafgify script, which we are using for the component.