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/esm/index.js CHANGED
@@ -5971,8 +5971,10 @@ var useSelect2 = function (_a) {
5971
5971
  }
5972
5972
  }, [searchValue, setTerm]);
5973
5973
  useEffect(function () {
5974
- if (!currentFields || !currentFields.length)
5974
+ if (!currentFields || !currentFields.length) {
5975
+ setValueSelected([]);
5975
5976
  return;
5977
+ }
5976
5978
  setValueSelected(function (prev) {
5977
5979
  if (currentFields.map(function (field) { return field.id; }).join() === prev.map(function (p) { return p.id; }).join()) {
5978
5980
  return prev;