forked from metabase/metabase
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
virtualize select content (metabase#6255)
* virtualize select content * clean up example * show examples
- Loading branch information
Showing
7 changed files
with
169 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import React from 'react' | ||
|
||
import Select, { Option } from 'metabase/components/Select' | ||
|
||
export const component = Select | ||
|
||
const fixture = [ | ||
{ name: 'Blue' }, | ||
{ name: 'Green' }, | ||
{ name: 'Red' }, | ||
{ name: 'Yellow' }, | ||
] | ||
|
||
export const description = ` | ||
A component used to make a selection | ||
` | ||
|
||
export const examples = { | ||
'Default': ( | ||
<Select onChange={() => alert('Selected')}> | ||
{ fixture.map(f => <Option name={f.name}>{f.name}</Option>)} | ||
</Select> | ||
), | ||
'With search': ( | ||
<Select | ||
searchProp='name' | ||
onChange={() => alert('Selected')} | ||
> | ||
{ fixture.map(f => <Option name={f.name}>{f.name}</Option>)} | ||
</Select> | ||
), | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4600,6 +4600,10 @@ insert-css@^0.2.0: | |
version "0.2.0" | ||
resolved "https://registry.yarnpkg.com/insert-css/-/insert-css-0.2.0.tgz#d15789971662d9899c28977fb6220d5381d2451a" | ||
|
||
insightful@^1.1.0: | ||
version "1.1.0" | ||
resolved "https://registry.yarnpkg.com/insightful/-/insightful-1.1.0.tgz#01afb2a62b49a6324bd5279618cd108e445037eb" | ||
|
||
[email protected]: | ||
version "1.2.0" | ||
resolved "https://registry.yarnpkg.com/internal-ip/-/internal-ip-1.2.0.tgz#ae9fbf93b984878785d50a8de1b356956058cf5c" | ||
|