Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Autocomplete] useLayoutEffect in combobox #4015

Merged
merged 2 commits into from Feb 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions UNRELEASED.md
Expand Up @@ -33,6 +33,7 @@ Use [the changelog guidelines](https://git.io/polaris-changelog-guidelines) to f
- Fixed `IndexTable` bug where bulk actions are operable when no rows are selected ([#4009](https://github.com/Shopify/polaris-react/pull/4009))
- Fixed `CheckableButton` missing border when focused ([#3987](https://github.com/Shopify/polaris-react/issues/3987))
- Removed all `outline` and `border`instances of `-ms-high-contrast` as it is non-standard ([#3962](https://github.com/Shopify/polaris-react/pull/3962)).
- Fixed `Autocomplete` popover height not being calculated correctly ([#4015](https://github.com/Shopify/polaris-react/pull/4015)).

### Documentation

Expand Down
4 changes: 2 additions & 2 deletions src/components/Autocomplete/components/ComboBox/ComboBox.tsx
@@ -1,4 +1,4 @@
import React, {useState, useEffect, useCallback} from 'react';
import React, {useState, useEffect, useLayoutEffect, useCallback} from 'react';

import {useUniqueId} from '../../../../utilities/unique-id';
import {useToggle} from '../../../../utilities/use-toggle';
Expand Down Expand Up @@ -240,7 +240,7 @@ export function ComboBox({
}
}, [selected, selectedOptions]);

useEffect(() => {
useLayoutEffect(() => {
let newNavigableOptions: (
| OptionDescriptor
| ActionListItemDescriptor
Expand Down