@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.cjs CHANGED
@@ -3228,6 +3228,7 @@ function SimpleSelect(props) {
3228
3228
  } = hooks.useContext(FormContext$1);
3229
3229
  const [isDropdownExpanded, setIsDropdownExpanded] = hooks.useState(false);
3230
3230
  const selectRef = hooks.useRef();
3231
+ const inputRef = hooks.useRef();
3231
3232
  const {
3232
3233
  state: loadState,
3233
3234
  values: options
@@ -3252,12 +3253,12 @@ function SimpleSelect(props) {
3252
3253
  return ds;
3253
3254
  }, [disabled, isDropdownExpanded, loadState, value]);
3254
3255
  const onMouseDown = hooks.useCallback(e => {
3255
- const select = selectRef.current;
3256
+ const input = inputRef.current;
3256
3257
  setIsDropdownExpanded(!isDropdownExpanded);
3257
3258
  if (isDropdownExpanded) {
3258
- select.blur();
3259
+ input.blur();
3259
3260
  } else {
3260
- select.focus();
3261
+ input.focus();
3261
3262
  }
3262
3263
  e.preventDefault();
3263
3264
  }, [isDropdownExpanded]);
@@ -3294,6 +3295,7 @@ function SimpleSelect(props) {
3294
3295
  id: prefixId(`${id}-display`, formId),
3295
3296
  children: valueLabel || 'Select'
3296
3297
  }), !disabled && jsxRuntime.jsx("input", {
3298
+ ref: inputRef,
3297
3299
  id: prefixId(`${id}-search`, formId),
3298
3300
  class: "fjs-select-hidden-input",
3299
3301
  value: valueLabel,