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

Update select-component.md #3319

Merged
merged 1 commit into from
Jan 29, 2019
Merged
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
5 changes: 2 additions & 3 deletions packages/select/src/components/select/select-component.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ data sets.

`Select`'s `itemRenderer` will be called for each item and receives the item and a props object containing data specific
to rendering this item in this frame. The renderer is called for all items, so don't forget to respect
`modifiers.filtered` to hide items that don't match the predicate. Also, don't forget to define a `key` for each item,
or face React's console wrath!
`modifiers.matchesPredicate` to hide items that don't match the predicate. Also, don't forget to define a `key` for each item, or face React's console wrath!

```tsx
import { Classes, MenuItem } from "@blueprintjs/core";
Expand All @@ -104,7 +103,7 @@ const filterFilm: ItemPredicate<IFilm> = (query, film) => {
};

const renderFilm: ItemRenderer<Film> = (film, { handleClick, modifiers }) => {
if (!modifiers.filtered) {
if (!modifiers.matchesPredicate) {
return null;
}
return (
Expand Down