Commit e5d69dcc authored by Wikiki's avatar Wikiki Committed by GitHub

Merge pull request #21 from kjhman21/allowdelete

Allow show/hide delete button using DOM attribute
parents 3356b92d 1d2eab5f
......@@ -49,6 +49,8 @@ export default class Tagify {
duplicates: true
}
this.element = element;
if( element.getAttribute("data-allow-delete") )
defaultOptions.allowDelete = element.getAttribute("data-allow-delete") == 'true';
this.options = Object.assign({}, defaultOptions, options);
this.init();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment