ywana-core8 0.0.978 → 0.0.979

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ywana-core8",
3
- "version": "0.0.978",
3
+ "version": "0.0.979",
4
4
  "description": "ywana-core8",
5
5
  "homepage": "https://ywana.github.io/workspace",
6
6
  "author": "Ernesto Roldan Garcia",
@@ -7,7 +7,7 @@ import './tokenfield.css'
7
7
  /**
8
8
  * Token Field
9
9
  */
10
- export const TokenField = ({ id, label, tokens = [], readOnly, options, onChange }) => {
10
+ export const TokenField = ({ id, label, tokens = [], readOnly, options, predictive=true, onChange }) => {
11
11
 
12
12
  const [value, setValue] = useState()
13
13
 
@@ -50,7 +50,7 @@ export const TokenField = ({ id, label, tokens = [], readOnly, options, onChange
50
50
  const sortedOptions = options ? options.toSorted((a, b) => {
51
51
  if (!a.label || !b.label) return 0
52
52
  try {
53
- return a.label.localeCompare(b.label)
53
+ return a.label+"".localeCompare(b.label+"")
54
54
  } catch (error) {
55
55
  console.log('Error sorting options', error, a, b)
56
56
  return 0
@@ -71,7 +71,7 @@ export const TokenField = ({ id, label, tokens = [], readOnly, options, onChange
71
71
  })}
72
72
 
73
73
  {options ? (
74
- <DropDown onChange={changeDropDown} options={sortedOptions} predictive={true} verbose={false} />
74
+ <DropDown onChange={changeDropDown} options={sortedOptions} predictive={predictive} verbose={false} />
75
75
  ) : (
76
76
  <input type='text' value={value} onChange={change} onKeyDown={onEnter} readOnly={readOnly} />)
77
77
  }