Comments (7)
OK I've made it so the tabKey
setting you've suggested will only autocomplete but won't convert it into a tag, unless tab
is pressed again. Will be available on next Tagify release (very soon)
from tagify.
Tab key currently adds the input as a tag, and is mapped just like the Enter key.
just yesterday I've coded a new setting called addTagOn
with the value ['blur', 'tab', 'enter']
so if one would want to not have the Tab key creating a tag of whatever is typed in the Tagify field, it's much easier now with this setting.
This is problematic because autoComplete: { rightKey: true }
only says "when clicking the right arrow key, auto-complete & also convert to a tag" while false
means only to autocomplete.
This means a tabKey
would also need to act the same way, which will mean I would have to disable
the current way the Tab key works, which might cause issues for other users since it was coded like this for many years now..
from tagify.
Coincidentally, I just upgraded from 2.31.3 to 4.18.1 (I know, I know 😅). The tab key used to work in v2.31 kinda as the enter key does in in the latest version - albeit it was a bit more intuitive back then since you now have to explicitly select an option from the selection list before the enter/tab can be applied. In 2.31 the first hit from the dropdown was automatically applied when pressing enter/tab
from tagify.
Thank you @yairEO , appreciate the time!
from tagify.
It occurred to me that the required dropdown selection is only needed when working with the Ajax Whitelist (https://github.com/yairEO/tagify/tree/2d2a5a1e0e6c4a7badb7616e593634c70b3b5574?tab=readme-ov-file#ajax-whitelist)
But a second time hitting tab
seems to be required. The first tab
autocompletes the selected option from the dropdown and stays in edit mode and a second tab
creates an actual tag from the addition.
See difference (.mov files):
Tagify 2.31 - 1.8MB
https://github.com/yairEO/tagify/assets/2494320/cdd32134-b0b5-4705-88bf-fc5ea9ad3671
Tagify 4.18 - 1.7MB
https://github.com/yairEO/tagify/assets/2494320/26c23d1f-042c-454b-8966-7e68a20e63c9
*keyboard input shown with KeyCastr
from tagify.
Coincidentally, I just upgraded from 2.31.3 to 4.18.1 (I know, I know 😅). The tab key used to work in v2.31 kinda as the enter key does in in the latest version - albeit it was a bit more intuitive back then since you now have to explicitly select an option from the selection list before the enter/tab can be applied. In 2.31 the first hit from the dropdown was automatically applied when pressing enter/tab
You can set dropdown.highlightFirst
setting to true
and this will for sure have something highlighted so Tab key will autocomplete.
As it is now, if nothing from the suggestions dropdown is highlighted then autocomplete won't work, forgot why it's like that :)
from tagify.
Thanks :)
I'll update the library, that should work as well - e5ffe6d
from tagify.
Related Issues (20)
- Unminified tagify.js is missing HOT 3
- UNPKG CDN Redirecting to tagify.min.js for v4.25.0 HOT 3
- Missing "./dist/tagify.css" specifier in "@yaireo/tagify" package
- setReadonly/setDisabled will blur any element that is not related to Tagify
- mix mode : pressing the enter key selects the first tag
- Callback when original tag data has loaded HOT 1
- Console warning on tag addition via enter key HOT 1
- Warning in Console: [Tagify]: Cannot find element in Tag template: . .tagify__tag-text HOT 1
- mix mode : pressing the down key at the end of line displays drop-down list
- Multiple init Tagify HOT 1
- Sprockets error in Rails 7 due to filename change in v4.25.0
- Intermittent error in setRangeAtStartEnd HOT 3
- prop-type error HOT 9
- Clicking outside doesn't close dropdown in select mode and tagX class is blank
- Options not filtered in select mode, userInput=true and tagX='' HOT 1
- in 4.26.2 value cannot be non-string in users-list example
- A double tag is created for delimiter when typed HOT 3
- react.tagify.jsx Failed to compile HOT 1
- Ignore an email address in the middle of an sentence HOT 1
- Tagify selct mode incorrect behavior HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tagify.