@bpmn-io/form-js-viewer 1.23.0 → 1.23.1

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.cjs CHANGED
@@ -4245,7 +4245,7 @@ function SearchableSelect(props) {
4245
4245
  onChange: props.onChange
4246
4246
  });
4247
4247
  const getLabelCorrelation = useGetLabelCorrelation(options);
4248
- const label = hooks.useMemo(() => value && getLabelCorrelation(value), [value, getLabelCorrelation]);
4248
+ const label = hooks.useMemo(() => minDash.isDefined(value) ? getLabelCorrelation(value) : undefined, [value, getLabelCorrelation]);
4249
4249
 
4250
4250
  // whenever we change the underlying value, set the label to it
4251
4251
  hooks.useEffect(() => {
@@ -4263,7 +4263,7 @@ function SearchableSelect(props) {
4263
4263
  const pickOption = hooks.useCallback(option => {
4264
4264
  setFilter(option && option.label || '');
4265
4265
  props.onChange({
4266
- value: option && option.value || null
4266
+ value: option?.value ?? null
4267
4267
  });
4268
4268
  }, [props]);
4269
4269
  const displayState = hooks.useMemo(() => {
@@ -4410,10 +4410,10 @@ function SimpleSelect(props) {
4410
4410
  onChange: props.onChange
4411
4411
  });
4412
4412
  const getLabelCorrelation = useGetLabelCorrelation(options);
4413
- const valueLabel = hooks.useMemo(() => value && getLabelCorrelation(value), [value, getLabelCorrelation]);
4413
+ const valueLabel = hooks.useMemo(() => minDash.isDefined(value) ? getLabelCorrelation(value) : undefined, [value, getLabelCorrelation]);
4414
4414
  const pickOption = hooks.useCallback(option => {
4415
4415
  props.onChange({
4416
- value: option && option.value || null
4416
+ value: option?.value ?? null
4417
4417
  });
4418
4418
  }, [props]);
4419
4419
  const displayState = hooks.useMemo(() => {