ywana-core8 0.0.980 → 0.0.982

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -2662,8 +2662,12 @@ var TokenField = function TokenField(_ref) {
2662
2662
  setValue(value);
2663
2663
  }
2664
2664
  function changeDropDown(fid, value) {
2665
- var next = Array.isArray(tokens) ? tokens.concat(value) : [value];
2666
- if (onChange) onChange(id, next);
2665
+ var isNumericValue = !isNaN(value);
2666
+ var valueIsNotEmpty = value && value.length > 0 || isNumericValue;
2667
+ if (valueIsNotEmpty) {
2668
+ var next = Array.isArray(tokens) ? tokens.concat(value) : [value];
2669
+ if (onChange) onChange(id, next);
2670
+ }
2667
2671
  setValue('');
2668
2672
  }
2669
2673
  function onEnter(event) {