You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when I am selecting from dropdown suggestion input field cursor move to beginning in input field.
fetch("data").then(async(response)=>{constdata=awaitresponse.json();constkeys=Object.keys(data.people[0]);// extract keys from the first object in the arrayvarinput=document.querySelector("#mixedinput"),tagify=newTagify(input,{mode: "mix",//Use `select` for single-value dropdown-like select box. See `mix` as value to allow mixed-content. The `pattern` setting must be set to some character.pattern: /@|#/,//Validate input by RegEx pattern (can also be applied on the input itself as an attribute).whitelist: keys,// An array of allowed tags.dropdown: {//dropdown setting 55position: "text",// 'manual' | 'text' | 'input' | 'all';includeSelectedTags: true,//enable tag to write again in tags field.classname: "customSuggestionsList",// Custom class name for the dropdown suggestions list. for css use,},});tagify.on("dropdown:show",function(data){tagify.dropdown.show();});// The component has received focus.tagify.on("focus",function(){tagify.dropdown.show();});vararr=[];tagify.on('dropdown:select',function(e){console.log('e',e);varvalue=e.detail.dataarr.push(value)tagify.addMixTags(arr)arr.pop()// tagify.dropdown.hide()});});
The text was updated successfully, but these errors were encountered:
@yairEO I have a similar problem. In my code (React), I have a trigger button beside my tagify input. When the user clicks this button, I set the focus back to the tagify input and then I call the dropdown.show() (code bellow). After the user selects the dropdown option, the cursor is sent back to the beginning. This doesn't happen when I trigger the dropdown opening naturally typing "@", for instance. Only when I use the trigger.
Is there any way you recommend for using a trigger with tagify? I tried to find it but couldn't.
I saw that internally you have some saving of the window selection (setStateSelection, or something like that), but this is not exposed. I had to replace the usage of "show" by "execCommand" adding the "@" character in the field, which opens the dropdown. But I doubt this is the best solution.
when I am selecting from dropdown suggestion input field cursor move to beginning in input field.
The text was updated successfully, but these errors were encountered: