@yaireo/tagify
Advanced tools
Comparing version 4.31.3 to 4.31.4
/* | ||
Tagify v4.31.3 - tags input component | ||
Tagify v4.31.4 - tags input component | ||
By: Yair Even-Or <vsync.design@gmail.com> | ||
@@ -4,0 +4,0 @@ https://github.com/yairEO/tagify |
{ | ||
"name": "@yaireo/tagify", | ||
"version": "4.31.3", | ||
"version": "4.31.4", | ||
"homepage": "https://github.com/yairEO/tagify", | ||
@@ -5,0 +5,0 @@ "description": "lightweight, efficient Tags input component in Vanilla JS / React / Angular [super customizable, tiny size & top performance]", |
@@ -58,3 +58,3 @@ import { sameStr, isObject, minify, getNodeHeight, getCaretGlobalPosition } from './helpers' | ||
if( (noWhitelist && !allowNewTags && !_s.templates.dropdownItemNoMatch) | ||
|| _s.dropdown.enable === false | ||
|| _s.dropdown.enabled === false | ||
|| this.state.isLoading | ||
@@ -61,0 +61,0 @@ || this.settings.readonly ) |
@@ -5,8 +5,10 @@ const VERSION = 1; // current version of persisted data. if code change breaks persisted data, verison number should be bumped. | ||
export const getPersistedData = id => key => { | ||
if( !id ) return {}; | ||
// if "persist" is "false", do not save to localstorage | ||
let customKey = '/'+key, | ||
persistedData, | ||
versionMatch = localStorage.getItem(STORE_KEY + id + '/v', VERSION) == VERSION | ||
currentStorageVersion = localStorage?.getItem(STORE_KEY + id + '/v') | ||
if( versionMatch ){ | ||
if( currentStorageVersion === VERSION){ | ||
try{ persistedData = JSON.parse(localStorage[STORE_KEY + id + customKey]) } | ||
@@ -23,3 +25,3 @@ catch(err){} | ||
// for storage invalidation | ||
localStorage.setItem(STORE_KEY + id + '/v', VERSION) | ||
localStorage?.setItem(STORE_KEY + id + '/v', VERSION) | ||
@@ -31,3 +33,3 @@ return (data, key) => { | ||
if( data && key ){ | ||
localStorage.setItem(STORE_KEY + id + customKey, persistedData) | ||
localStorage?.setItem(STORE_KEY + id + customKey, persistedData) | ||
dispatchEvent( new Event('storage') ) | ||
@@ -34,0 +36,0 @@ } |
@@ -30,3 +30,2 @@ import {ZERO_WIDTH_UNICODE_CHAR} from './constants' | ||
autocorrect="off" | ||
spellcheck="false" | ||
aria-autocomplete="both" | ||
@@ -33,0 +32,0 @@ aria-multiline="${_s.mode=='mix'?true:false}"></span>` |
@@ -8,3 +8,3 @@ let React; | ||
async function initReact() { | ||
function initReact() { | ||
try { | ||
@@ -20,3 +20,3 @@ // Try to import React as a namespace (React 18+) | ||
await initReact(); | ||
initReact(); | ||
@@ -23,0 +23,0 @@ function renderToStaticMarkup(element) { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
5612
4315315