arengibook 2.4.627 → 2.4.628

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.
Files changed (2) hide show
  1. package/dist/index.js +8 -7
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -39133,10 +39133,10 @@ var MultiSelectMetaAsync = function MultiSelectMetaAsync(_ref) {
39133
39133
  var loadLazyTimeout = useRef();
39134
39134
  var currentPageRef = useRef(1);
39135
39135
  var isOptionsArray = Array.isArray(options);
39136
- var numericValue = value.map(function (v) {
39136
+ var numericValue = Array.isArray(value) ? value.map(function (v) {
39137
39137
  return typeof v === 'string' ? parseInt(v, 10) : v;
39138
- });
39139
- var numericObjValue = objValue ? objValue.map(function (opt) {
39138
+ }) : [];
39139
+ var numericObjValue = Array.isArray(objValue) ? objValue.map(function (opt) {
39140
39140
  return _objectSpread2(_objectSpread2({}, opt), {}, _defineProperty$b({}, optionValue, typeof opt[optionValue] === 'string' ? parseInt(opt[optionValue], 10) : opt[optionValue]));
39141
39141
  }) : null;
39142
39142
  useEffect(function () {
@@ -39145,7 +39145,7 @@ var MultiSelectMetaAsync = function MultiSelectMetaAsync(_ref) {
39145
39145
  } else {
39146
39146
  var loadInitialOptions = /*#__PURE__*/function () {
39147
39147
  var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
39148
- var result;
39148
+ var result, initialValues;
39149
39149
  return _regenerator().w(function (_context) {
39150
39150
  while (1) switch (_context.n) {
39151
39151
  case 0:
@@ -39156,9 +39156,10 @@ var MultiSelectMetaAsync = function MultiSelectMetaAsync(_ref) {
39156
39156
  case 1:
39157
39157
  result = _context.v;
39158
39158
  setLoadedOptions((result === null || result === void 0 ? void 0 : result.options) || []);
39159
- setSelectedOptions(objValue ? _toConsumableArray$7(numericObjValue.map(function (opt) {
39159
+ initialValues = numericObjValue ? numericObjValue.map(function (opt) {
39160
39160
  return opt[optionValue];
39161
- })) : numericValue !== null && numericValue !== void 0 ? numericValue : []);
39161
+ }) : numericValue;
39162
+ setSelectedOptions(initialValues);
39162
39163
  case 2:
39163
39164
  return _context.a(2);
39164
39165
  }
@@ -39170,7 +39171,7 @@ var MultiSelectMetaAsync = function MultiSelectMetaAsync(_ref) {
39170
39171
  }();
39171
39172
  loadInitialOptions();
39172
39173
  }
39173
- }, [options, objValue, value]);
39174
+ }, [options, numericObjValue, numericValue]);
39174
39175
  useEffect(function () {
39175
39176
  var observer = new MutationObserver(function () {
39176
39177
  var panel = document.querySelector('.p-multiselect-panel.p-component');
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "arengibook",
3
3
  "private": false,
4
- "version": "2.4.627",
4
+ "version": "2.4.628",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
7
7
  "exports": {