Tagify cuts text/weird behavior

Wappler Version : 4.7.0
Operating System : Windows 10 x64
Server Model: NodeJS
Database Type: PostgreSQL
Hosting Type: Docker

I have a DB output which I’m using as data source for tagify.
Example:

{
"sam_sip_id": 2,
"sam_sip_number": 22457,
"sam_sip_secret": "22457",
"sam_sip_caller_id": "22457",
"sam_sip_description": "Description",
"sam_sip_jira_ticket": null,
"sam_sip_created_timestamp": null,
"sam_sip_last_modified_timestamp": null,
"sam_sip_location": "RIX"
},

Tagify settings bellow:
First:
image

When I’m trying to add long values Tagify becomes very weird. See recording bellow:

Second:

Some time is shows just random values.

Not sure if it is the issue, but try to use a string value for the Text Field. You could use sam_sip_caller_id instead of sam_sip_number. Will see if I can reproduce the problem.

Yes, I thought the same.
I’ve changed to SIP number which is a text value and first few tags added correctly but then after some - it repeat the issue:

Not sure if it’s related but I’m getting error in Dev tools console:

DevTools failed to load source map: Could not load content for http://localhost:8100/dmxAppConnect/maps/dmxTagify.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

I’ve checked - there is no such file in such directory.

The error in the console has nothing to do with this, the source maps are not required.

Does it happen random or does it happen on the same items each time? Does your data maybe have duplicate values?

For debugging you could output the actual items/values on the page:

<pre>
{{ json(tagify1.items) }}

{{ json(tagify1.values) }}
</pre>

Replace tagify1 with the id of your tagify component.

So here is my DB entries:

When I enter “321321321” I see completely different “sam_sip_secret” which has value of “9” ID 25 in screenshot above:

With all others entries seems to be good:

Here’s output of those two records from Server Connect:

{
"sam_sip_id": 9,
"sam_sip_number": "6",
"sam_sip_secret": "321321321",
"sam_sip_caller_id": "121212",
"sam_sip_description": "Description",
"sam_sip_jira_ticket": null,
"sam_sip_created_timestamp": null,
"sam_sip_last_modified_timestamp": null,
"sam_sip_location": "TBS"
},

{
"sam_sip_id": 25,
"sam_sip_number": "22",
"sam_sip_secret": "9",
"sam_sip_caller_id": "131313",
"sam_sip_description": "Description",
"sam_sip_jira_ticket": null,
"sam_sip_created_timestamp": null,
"sam_sip_last_modified_timestamp": null,
"sam_sip_location": "TBS"
},

I’ve already tried to clear cache - didn’t helped.
Tried even different browser - didn’t helped.
Tried to drop all tables and re-created them - didn’t helped.

I was thinking that he sets the last ID in the array, but I’ve added additional entry in DB and this bug stills refers to value in ID 25.

Here’s actual Tagify setttings:
image

image

I’ve slightly changed DBs entries which looks like this:

And what ever value is in entry ID 9 in Tagify it will refer to value in ID 25

Even works with text values:

So it seems to mess up with the records where the text and value matches. When you select value 9 with text TEST it seems to insert it with the text 9 which matches value 24.

I can reproduce it this way, will see if I can fix it.

I’m very glad that you could reproduce this, because I was thinking that something is wrong either with my environment or pc.

Would it be possible for you to have a dataset where the value and label wouldn’t match. It seems to be a difficult problem to fix. When you select TEST in your sample it will insert the value 9 and lookup the value in both the value and label fields, so in your case in sam_sip_id and sam_sip_secret, and it will see a match of 9 in the sam_sip_secret field and return that as selected item.

The problem is just that tags are allowed to be added by value or label, so when there are duplicates it will not know which is the correct item and can return the invalid item.

Thank you for technical explanation @patrick
Will focus on other visual representation of group membership like group list - Help with List Group

Yet still I think that my case is not unique and there will be other edge cases with Tagify.