diff --git a/README.md b/README.md index 0363bd2ea..40f991a78 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ Select also accepts public props from `BaseSelect`, except `showSearch`, which i | Name | Description | Type | Default | | --- | --- | --- | --- | -| autoComplete | Browser autocomplete hint for the search input. | string | `new-password` | +| autoComplete | Browser autocomplete hint for the search input. | string | `off` | | autoClearSearchValue | Deprecated. Use `showSearch.autoClearSearchValue` instead. | boolean | true | | backfill | Backfill the active option into the input. Only works in `combobox` mode. | boolean | false | | children | Legacy option children. Prefer `options` for new code. | ReactNode | - | diff --git a/src/SelectInput/Input.tsx b/src/SelectInput/Input.tsx index dc7680443..0980fdead 100644 --- a/src/SelectInput/Input.tsx +++ b/src/SelectInput/Input.tsx @@ -171,7 +171,7 @@ const Input = React.forwardRef((props, ref) => { '--select-input-width': widthCssVar, } as React.CSSProperties, autoFocus, - autoComplete: autoComplete ?? contextAutoComplete ?? 'new-password', + autoComplete: autoComplete ?? contextAutoComplete ?? 'off', className: inputCls, disabled, value: value || '', diff --git a/tests/Select.test.tsx b/tests/Select.test.tsx index b404a9edc..3871517eb 100644 --- a/tests/Select.test.tsx +++ b/tests/Select.test.tsx @@ -1430,7 +1430,7 @@ describe('Select.Basic', () => { expect(container.querySelector('.rc-select-item-empty').textContent).toEqual('Not Found'); }); - it('uses text input type with autocomplete suppression by default', () => { + it('uses text input type with autocomplete off by default', () => { const { container } = render( "`; +exports[`Select.SSR should work 1`] = `"
"`;