magneto365.ui 2.40.2 → 2.40.3

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/cjs/index.js CHANGED
@@ -5980,8 +5980,10 @@ var useSelect2 = function (_a) {
5980
5980
  }
5981
5981
  }, [searchValue, setTerm]);
5982
5982
  React.useEffect(function () {
5983
- if (!currentFields || !currentFields.length)
5983
+ if (!currentFields || !currentFields.length) {
5984
+ setValueSelected([]);
5984
5985
  return;
5986
+ }
5985
5987
  setValueSelected(function (prev) {
5986
5988
  if (currentFields.map(function (field) { return field.id; }).join() === prev.map(function (p) { return p.id; }).join()) {
5987
5989
  return prev;