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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EuiSelectable] Partial ListProps type #3787

Merged
merged 5 commits into from
Jul 22, 2020
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- Fixed type definitions for `findTestSubject` and `takeMountedSnapshot` ([#3763](https://github.com/elastic/eui/pull/3763))
- Fixed `EuiComboBox` not allowing clicks on previously virtualized items when inside of `EuiFormRow` ([#3784](https://github.com/elastic/eui/pull/3784))
- Removed `[Space]` as a way to select options in `EuiSelectable` ([#3784](https://github.com/elastic/eui/pull/3784))
- Fixed type definition for `windowProps` in `EuiSelectable` ([#3787](https://github.com/elastic/eui/pull/3787))

## [`27.1.0`](https://github.com/elastic/eui/tree/v27.1.0)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ exports[`EuiSelectable props isLoading 1`] = `
/>
`;

exports[`EuiSelectable props listProps 1`] = `
<div
class="euiSelectable"
/>
`;

exports[`EuiSelectable props renderOption 1`] = `
<div
class="euiSelectable"
Expand Down
15 changes: 15 additions & 0 deletions src/components/selectable/selectable.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,5 +113,20 @@ describe('EuiSelectable', () => {

expect(component).toMatchSnapshot();
});

test('listProps', () => {
const component = render(
<EuiSelectable
options={options}
listProps={{
windowProps: {
onScroll: () => {},
},
}}
/>
);

expect(component).toMatchSnapshot();
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export type EuiSelectableOptionsListProps = CommonProps &
/**
* Any props to send specifically to the react-window `FixedSizeList`
*/
windowProps?: ListProps;
windowProps?: Partial<ListProps>;
/**
* Adds a border around the list to indicate the bounds;
* Useful when the list scrolls, otherwise use your own container
Expand Down