iTwin / iTwinUI-react

A react component library for iTwinUI.
https://github.com/iTwin/iTwinUI
Other
83 stars 23 forks source link

Disable browser suggestion for ComboBox element #950

Closed neetra closed 1 year ago

neetra commented 1 year ago

Describe the bug (actual behavior)

Shows suggestions from browser as well as comboBox options.

Expected behavior

Disable auto- suggestion from the browser for ComboBox element.

Reproduction

click on the dropdown, you can see suggestions from drop-down

Problem:

• The ComboBox, does not allow to add autocomplete = off property • Work around : Add property to

adds property to all child elements. However, we only want to disable for ComboBox (drop-down element).

mayank99 commented 1 year ago

Thanks for the issue @neetra. I think some information is missing in your issue description or just jumbled up. Can you double check? A code sample or a link to a sandbox would help.

If you're trying to pass dom attributes to the native <input> element inside the combobox, then you need to do it through inputProps.

<ComboBox
  options={options}
  inputProps={{ autocomplete: 'off' }}
/>
neetra commented 1 year ago

Thanks . It works . However, I was unable find it in

  1. core-combobox--basic document
  2. Not even image