ywana-core8 0.0.569 → 0.0.570
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 +10 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +10 -6
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +10 -6
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/html/textfield.js +5 -4
- package/src/html/textfield.test.js +1 -0
- package/src/html/tokenfield.js +3 -2
package/dist/index.modern.js
CHANGED
@@ -1374,14 +1374,15 @@ var DropDown = function DropDown(props) {
|
|
1374
1374
|
if (!readOnly) setOpen(!open);
|
1375
1375
|
}
|
1376
1376
|
|
1377
|
-
function select(
|
1378
|
-
var next =
|
1377
|
+
function select(value) {
|
1378
|
+
var next = value;
|
1379
1379
|
var option = options.find(function (option) {
|
1380
1380
|
return option.value === next;
|
1381
1381
|
});
|
1382
1382
|
setOpen(false);
|
1383
1383
|
var label = verbose ? option.label : "";
|
1384
1384
|
setLabel(label);
|
1385
|
+
console.log("dd.select", value);
|
1385
1386
|
if (onChange) onChange(id, next);
|
1386
1387
|
}
|
1387
1388
|
|
@@ -1400,12 +1401,13 @@ var DropDown = function DropDown(props) {
|
|
1400
1401
|
var lis = items.map(function (option) {
|
1401
1402
|
return /*#__PURE__*/React.createElement("li", {
|
1402
1403
|
key: option.value,
|
1403
|
-
value: option.value
|
1404
|
+
value: option.value,
|
1405
|
+
onClick: function onClick() {
|
1406
|
+
return select(option.value);
|
1407
|
+
}
|
1404
1408
|
}, /*#__PURE__*/React.createElement(Text, null, option.label));
|
1405
1409
|
});
|
1406
|
-
return /*#__PURE__*/React.createElement("menu", null, /*#__PURE__*/React.createElement("ul",
|
1407
|
-
onMouseDown: select
|
1408
|
-
}, lis));
|
1410
|
+
return /*#__PURE__*/React.createElement("menu", null, /*#__PURE__*/React.createElement("ul", null, lis));
|
1409
1411
|
} else {
|
1410
1412
|
return null;
|
1411
1413
|
}
|
@@ -2041,6 +2043,7 @@ var TokenField = function TokenField(_ref) {
|
|
2041
2043
|
|
2042
2044
|
function changeDropDown(fid, value) {
|
2043
2045
|
var next = Array.isArray(tokens) ? tokens.concat(value) : [value];
|
2046
|
+
console.log("next", next);
|
2044
2047
|
if (onChange) onChange(id, next);
|
2045
2048
|
setValue('');
|
2046
2049
|
}
|
@@ -2066,6 +2069,7 @@ var TokenField = function TokenField(_ref) {
|
|
2066
2069
|
}
|
2067
2070
|
|
2068
2071
|
var tks = Array.isArray(tokens) ? tokens : [];
|
2072
|
+
console.log("render", tks);
|
2069
2073
|
return /*#__PURE__*/React.createElement("div", {
|
2070
2074
|
className: "tokenField"
|
2071
2075
|
}, /*#__PURE__*/React.createElement("label", null, label), tks.map(function (text, index) {
|