Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Support for Select All Filtered #46

Open
xiaoyunyang opened this issue Jun 28, 2019 · 0 comments
Open

Support for Select All Filtered #46

xiaoyunyang opened this issue Jun 28, 2019 · 0 comments

Comments

@xiaoyunyang
Copy link

Can we add the capability to select all filtered options?

Currently, it's possible to filter options using keywords, which updates SelectList accordingly. However, the SelectItem associated with the "select all" checkbox only operates on the original options, rather than the filtered options.

{hasSelectAll &&
<SelectItem
focused={focusIndex === 0}
checked={this.allAreSelected()}
option={selectAllOption}
onSelectionChanged={this.selectAllChanged}
onClick={() => this.handleItemClicked(0)}
ItemRenderer={ItemRenderer}
disabled={disabled}
/>
}

To accomplish this goal, we can make some changes to the allAreSelected(), selectAll, and selectNone methods in SelectPanel to make use of this.filteredOptions() instead of props.options.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant