@bpmn-io/form-js-viewer 1.4.0 → 1.5.0-alpha.0

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.es.js CHANGED
@@ -3208,6 +3208,7 @@ function SimpleSelect(props) {
3208
3208
  } = useContext(FormContext$1);
3209
3209
  const [isDropdownExpanded, setIsDropdownExpanded] = useState(false);
3210
3210
  const selectRef = useRef();
3211
+ const inputRef = useRef();
3211
3212
  const {
3212
3213
  state: loadState,
3213
3214
  values: options
@@ -3232,12 +3233,12 @@ function SimpleSelect(props) {
3232
3233
  return ds;
3233
3234
  }, [disabled, isDropdownExpanded, loadState, value]);
3234
3235
  const onMouseDown = useCallback(e => {
3235
- const select = selectRef.current;
3236
+ const input = inputRef.current;
3236
3237
  setIsDropdownExpanded(!isDropdownExpanded);
3237
3238
  if (isDropdownExpanded) {
3238
- select.blur();
3239
+ input.blur();
3239
3240
  } else {
3240
- select.focus();
3241
+ input.focus();
3241
3242
  }
3242
3243
  e.preventDefault();
3243
3244
  }, [isDropdownExpanded]);
@@ -3274,6 +3275,7 @@ function SimpleSelect(props) {
3274
3275
  id: prefixId(`${id}-display`, formId),
3275
3276
  children: valueLabel || 'Select'
3276
3277
  }), !disabled && jsx("input", {
3278
+ ref: inputRef,
3277
3279
  id: prefixId(`${id}-search`, formId),
3278
3280
  class: "fjs-select-hidden-input",
3279
3281
  value: valueLabel,