@redneckz/wildless-cms-uni-blocks 0.14.1052 → 0.14.1053

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.
@@ -5433,7 +5433,15 @@
5433
5433
  key: _.key || '',
5434
5434
  text: _.value,
5435
5435
  })) || [];
5436
- return (jsx(SelectControl, { placeholder: placeholder, options: leadOptions, ...field(fieldName), ...rest, onChange: onChange ?? field(fieldName)?.onChange }));
5436
+ const fieldProps = field(fieldName);
5437
+ const currentValue = fieldProps?.value;
5438
+ const updateValue = useMemo(() => {
5439
+ if (currentValue?.key && !currentValue?.text) {
5440
+ return leadOptions.find((opt) => opt.key === currentValue.key) ?? currentValue;
5441
+ }
5442
+ return currentValue;
5443
+ }, [currentValue, leadOptions]);
5444
+ return (jsx(SelectControl, { placeholder: placeholder, options: leadOptions, ...field(fieldName), value: updateValue, ...rest, onChange: onChange ?? field(fieldName)?.onChange }));
5437
5445
  });
5438
5446
 
5439
5447
  const AmountWorkersField = JSX(({ field, input }) => {
@@ -14784,7 +14792,7 @@
14784
14792
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
14785
14793
  });
14786
14794
 
14787
- const packageVersion = "0.14.1051";
14795
+ const packageVersion = "0.14.1052";
14788
14796
 
14789
14797
  exports.Blocks = Blocks;
14790
14798
  exports.ContentPage = ContentPage;