SparkFountain
SparkFountain

Reputation: 2270

Semantic UI React Select dropdown not closing

Since a few days, our web app using React 16.14 with Semantic UI React (v.2.0.3) shows a strange behavior: When I select an option from the opening dropdown, the option is selected but the dropdown remains open.

This only happens on Windows 11 machines with Google Chrome v.127.0.6533.120 (64 bit). On Firefox and Edge everything works normally.

<Form.Field data-test="FilterFormFieldSelect">
  <Select
    value={data.fieldName}
    search
    onChange={handleOnChangeField}
    options={fields.map(item => ({
      value: item.name,
      text: item.label,
      content: item.content,
      icon: item.listIcon,
    }))}
  />
</Form.Field>

const handleOnChangeField = (e, target) => {
  const newField = getField(target.value);
  const sameFormType = newField.formType.name === formType.name;

  setData({
    fieldName: target.value,
    value: sameFormType ? data.value : newField.defaultValue,
    error: false,
  });
};

I already tried the following solution approaches, all without success:

Does anybody have similar issues with React / Semantic UI components, or knows about recent Google Chrome changes on class updates in the DOM tree?

Upvotes: 1

Views: 138

Answers (1)

joe lewis
joe lewis

Reputation: 21

We saw the same issue. Once we updated to the latest chrome version it was corrected. Version 128.0.6613.85

Upvotes: 2

Related Questions