ywana-core8 0.0.140 → 0.0.144

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.umd.js CHANGED
@@ -933,10 +933,6 @@
933
933
  label = _useState2[0],
934
934
  setLabel = _useState2[1];
935
935
 
936
- var _useState3 = React.useState(),
937
- filter = _useState3[0],
938
- setFilter = _useState3[1];
939
-
940
936
  React.useEffect(function () {
941
937
  if (Array.isArray(options)) {
942
938
  var option = options.find(function (option) {
@@ -950,7 +946,7 @@
950
946
  console.log('dropdown change > canFilter:', canFilter, id, value);
951
947
 
952
948
  if (canFilter) {
953
- setFilter(value);
949
+ setLabel(value);
954
950
  } else {
955
951
  if (onChange) onChange(id, value);
956
952
  }
@@ -984,8 +980,9 @@
984
980
  if (canShow) {
985
981
  var filterActive = canFilter && label && label.length > 0;
986
982
  var items = filterActive ? options.filter(function (option) {
987
- return canFilter === false || filter.toUpperCase().indexOf(option.label.toUpperCase()) >= 0;
983
+ return option.label.toUpperCase().indexOf(label.toUpperCase()) >= 0;
988
984
  }) : options;
985
+ console.log('filterActive: ', filterActive, label, items.length);
989
986
  var lis = items.map(function (option) {
990
987
  return /*#__PURE__*/React__default["default"].createElement("li", {
991
988
  key: option.value,
@@ -1325,14 +1322,16 @@
1325
1322
 
1326
1323
 
1327
1324
  var StringCellViewer = function StringCellViewer(_ref4) {
1328
- var value = _ref4.value,
1325
+ var id = _ref4.id,
1326
+ value = _ref4.value,
1329
1327
  options = _ref4.options;
1328
+ console.log('string-cell-viewer', id, value, options);
1330
1329
  var option = options ? options.find(function (o) {
1331
1330
  return o.value === value;
1332
1331
  }) : null;
1333
1332
  var text = option ? option.label : value;
1334
1333
  return /*#__PURE__*/React__default["default"].createElement("div", {
1335
- className: "field-editor string-editor"
1334
+ className: "field-editor string-viewer"
1336
1335
  }, text);
1337
1336
  };
1338
1337
  /**