Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
ember-tag-input
Advanced tools
ember-tag-input is a simple Ember addon that converts a user's typing into tags. New tags are created when the user types a comma, space, or hits the enter key. Tags can be removed using the backspace key or by clicking the x button on each tag.
In the simplest case, just pass a list of tags to render and actions for adding and removing tags. The component will never change the tags list for you, it will instead call actions when changes need to be made. The component will yield each tag in the list, allowing you to render it as you wish.
{{#tag-input
tags=tags
addTag=(action 'addTag')
removeTagAtIndex=(action 'removeTagAtIndex')
as |tag|
}}
{{tag}}
{{/tag-input}}
import Ember from 'ember';
export default Ember.Controller.extend({
tags: [],
actions: {
addTag(tag) {
this.get('tags').pushObject(tag);
},
removeTagAtIndex(index) {
this.get('tags').removeAt(index);
}
}
});
The above example works if your tags array is just an simple array of strings. If your tags are more complex objects, you can render them however you want, as demonstrated by the following example:
{{#tag-input
tags=tags
addTag=(action 'addTag')
removeTagAtIndex=(action 'removeTagAtIndex')
as |tag|
}}
<div class="tagInput-name">
{{tag.name}}
</div>
<div class="tagInput-date">
{{tag.date}}
</div>
{{/tag-input}}
emberTagInput-tag--remove
to the element that is about to be removed.FAQs
Ember tag input
The npm package ember-tag-input receives a total of 3,476 weekly downloads. As such, ember-tag-input popularity was classified as popular.
We found that ember-tag-input demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.