Comments (2)
You have to add custom attributes to your tags, and then style those attributes. In your case, every time a new tag is added, also add an attribute that indicates it is new. Instead of storing the tags as a list of strings, store them in tagify as a list of objects, that have a "value" key (this is the displayed value of the tag), and then any other attributes you want. I add one to my tags called "data-sortorder" and then style based on their sort order.
const decorateSortOrder = useCallback(
(tagsToDecorate) => {
return tagsToDecorate?.map((tag) => ({ value: tag, "data-sortorder": tags.dictionary[tag] }));
},
[tags],
);
.imageTag[data-sortorder="10"] {
background-color: lightgreen;
border: 0.1rem solid limegreen;
}
from tagify.
Related Issues (20)
- A double tag is created for delimiter when typed HOT 3
- react.tagify.jsx Failed to compile HOT 4
- Ignore an email address in the middle of an sentence HOT 1
- Tagify selct mode incorrect behavior HOT 7
- React className property supports only one class
- "Uncaught (in promise) TypeError: t is null" when pressing Tab key with empty input and dropdown is shown
- default highlighting of selected value in single-select mode in the dropdown HOT 5
- autoComplete.rightKey = true, mode = null (Default), two problems with the rightKey behavior
- We Insert HTML Tags Or some text between '<' and '>' its remove from textarea when edit HOT 2
- On mobile device keyboard automatically adds space after dot type so it's not possible to write an email to tag
- Curly braces not working for tags even with mixTagsInterpolator in settings HOT 2
- Tagify cannot be compiled with Vite HOT 11
- Prevent new lines at all in tagify input HOT 1
- Duplicates not allowed in 'mix' mode even though duplicates is true HOT 1
- Tagify Initialization Issue in Symfony Application with Inconsistent Behavior Across Form Fields
- SvelteKit: "SyntaxError: Unexpected token 'export'"
- Add event should not get triggered for existing tags upon initialization HOT 5
- Tag with Value '0' is Not Selectable HOT 1
- import Tags doesn't work in typescript HOT 5
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.