Tagify OnChange Event Does Not Always Work

Wappler Version : 5.2.2
Operating System : W10
Server Model: NodeJS

We have replace select2 in one of our projects with tagify. But we are seeing an issue with selecting items.
After selection, the dmx-on:change event fails to trigger, causing the input to just show the selected value, and UI appears stuck.
The setup we have is that we run a SC on change event, which then clears the input on success.
Users of the app have reported this occasional bug as well.

There is no defined way to reproduce this, but to keep trying by refreshing the page, and wait for it to get stuck.

Can you post your tagify code please?

Can you post a screenshot of this also?

<input dmx-bind:disabled="scGetAllProducts.state.executing || scDoDomainMapping.state.executing" is="dmx-tagify" id="txtProductID" class="form-control h-auto" dmx-bind:data="scGetAllProducts.data.qList" tag-text="cpc_product_name +' | '+ cpc_product_code" tag-value="cpc_product_code" min-chars="0" dmx-on:changed="scDoDomainMapping.load({cpc_product_code: value, domain_id: ddDomain.data.domain_id})" nocustom="true" mode="select">

What I meant is that user just sees the value selected in the input, when it should clear-out within a second or so. The UI itself does not hang or become unresponsive.

Can you make a short video showing the issue?

Like I wrote, there is no way to reproduce this, but to keep trying it.
The problem simply is that CHANGE even does not trigger occasionally.

I can try a few time to see if I can reproduce and capture it on video.

What does this changed event do? It reloads a server action. Did you verify in the dev tools the server action is not running actually?

In this context, it just loads the server action with certain GET params to map the selected item in a table.

Yes. And there are no errors in console either.

@sid Just in case, the issue you are facing is not similar to this?

Unfortunately not in this case.
But I think I have seen the ID mix-up recently as well. Don’t remember exactly, will check with one of my devs and get back to you on the other post.

Have sent you a video privately.

Instead of changed event try using the change or updated event. Tagify doesn’t detect user changes very well and that could cause the changed event not being triggered. The updated event is always triggered when the value changes and the change event is a custom event from the tagify plugin to detect changes.

One other issue I noted was that any leading spaces in the option value or description values can cause issues occasionally. I’d recommending trimming() by default.

Updated event worked. Thanks.