diff --git a/packages/docs-app/src/examples/select-examples/films.tsx b/packages/docs-app/src/examples/select-examples/films.tsx index a92fd3dafc..8d61095cbe 100644 --- a/packages/docs-app/src/examples/select-examples/films.tsx +++ b/packages/docs-app/src/examples/select-examples/films.tsx @@ -182,3 +182,11 @@ export const filmSelectProps = { itemRenderer: renderFilm, items: TOP_100_FILMS, }; + +export function createFilm(title: string): IFilm { + return { + rank: 100 + Math.floor(Math.random() * 100 + 1), + title, + year: new Date().getFullYear(), + }; +} diff --git a/packages/docs-app/src/examples/select-examples/multiSelectExample.tsx b/packages/docs-app/src/examples/select-examples/multiSelectExample.tsx index 54e45770a9..57c746b915 100644 --- a/packages/docs-app/src/examples/select-examples/multiSelectExample.tsx +++ b/packages/docs-app/src/examples/select-examples/multiSelectExample.tsx @@ -9,7 +9,7 @@ import * as React from "react"; import { Button, H5, Intent, ITagProps, MenuItem, Switch } from "@blueprintjs/core"; import { Example, IExampleProps } from "@blueprintjs/docs-theme"; import { ItemRenderer, MultiSelect } from "@blueprintjs/select"; -import { filmSelectProps, IFilm, TOP_100_FILMS } from "./films"; +import { createFilm, filmSelectProps, IFilm, TOP_100_FILMS } from "./films"; const FilmMultiSelect = MultiSelect.ofType(); @@ -19,6 +19,7 @@ export interface IMultiSelectExampleState { films: IFilm[]; hasInitialContent: boolean; intent: boolean; + allowCreate: boolean; openOnKeyDown: boolean; popoverMinimal: boolean; resetOnSelect: boolean; @@ -27,6 +28,7 @@ export interface IMultiSelectExampleState { export class MultiSelectExample extends React.PureComponent { public state: IMultiSelectExampleState = { + allowCreate: false, films: [], hasInitialContent: false, intent: false, @@ -42,6 +44,7 @@ export class MultiSelectExample extends React.PureComponent 0 ?