ywana-core8 0.0.972 → 0.0.974
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 +5 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +5 -6
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +5 -6
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/html/table.js +1 -1
- package/src/html/tokenfield.js +4 -2
package/package.json
CHANGED
package/src/html/table.js
CHANGED
@@ -415,7 +415,7 @@ const StringCellViewer = ({ id, value, format, options, action }) => {
|
|
415
415
|
const locale = window.navigator.userLanguage || window.navigator.language;
|
416
416
|
switch (format) {
|
417
417
|
case FORMATS.TOKENS:
|
418
|
-
text = value && Array.isArray(value) ? value.
|
418
|
+
text = value && Array.isArray(value) ? value.join(", ") : value
|
419
419
|
break;
|
420
420
|
case FORMATS.COLOR:
|
421
421
|
text = <input type="color" value={text} disabled />
|
package/src/html/tokenfield.js
CHANGED
@@ -47,6 +47,8 @@ export const TokenField = ({ id, label, tokens = [], readOnly, options, onChange
|
|
47
47
|
}
|
48
48
|
|
49
49
|
const tks = Array.isArray(tokens) ? tokens : []
|
50
|
+
const sortedOptions = options ? options.sort((a, b) => a.label.localeCompare(b.label)) : null
|
51
|
+
|
50
52
|
return (
|
51
53
|
<div className='tokenField'>
|
52
54
|
<label>{label}</label>
|
@@ -61,7 +63,7 @@ export const TokenField = ({ id, label, tokens = [], readOnly, options, onChange
|
|
61
63
|
})}
|
62
64
|
|
63
65
|
{options ? (
|
64
|
-
<DropDown onChange={changeDropDown} options={
|
66
|
+
<DropDown onChange={changeDropDown} options={sortedOptions} predictive={true} verbose={false} />
|
65
67
|
) : (
|
66
68
|
<input type='text' value={value} onChange={change} onKeyDown={onEnter} readOnly={readOnly} />)
|
67
69
|
}
|
@@ -81,4 +83,4 @@ const Token = ({ text, onDelete }) => {
|
|
81
83
|
<Icon icon='close' clickable action={onDelete} size="small" />
|
82
84
|
</div>
|
83
85
|
)
|
84
|
-
}
|
86
|
+
}
|