diff --git a/src/components/Select/README.md b/src/components/Select/README.md index 8d7146ee18..d60f3ed295 100644 --- a/src/components/Select/README.md +++ b/src/components/Select/README.md @@ -1023,11 +1023,12 @@ To render custom popup use the `renderPopup` property. code={` { options={extralong} width="max" popupWidth={200} + className="select-example" title="Sample select" />

Short values. Adjust to Control width

- +

Modes default/fit

diff --git a/src/components/Select/__stories__/SelectShowcase.scss b/src/components/Select/__stories__/SelectShowcase.scss index f2705e3a6c..794f3382f2 100644 --- a/src/components/Select/__stories__/SelectShowcase.scss +++ b/src/components/Select/__stories__/SelectShowcase.scss @@ -11,6 +11,10 @@ $blockSelectClear: '.#{variables.$ns}select-clear'; width: 300px; } +.select-example { + margin: 5px 0; +} + #{$block} { display: flex; flex-direction: column; diff --git a/src/components/Select/__stories__/SelectShowcase.tsx b/src/components/Select/__stories__/SelectShowcase.tsx index 3ea86c4d00..b4bb839588 100644 --- a/src/components/Select/__stories__/SelectShowcase.tsx +++ b/src/components/Select/__stories__/SelectShowcase.tsx @@ -17,6 +17,7 @@ import {block} from '../../utils/cn'; import { EXAMPLE_CHILDREN_OPTIONS, EXAMPLE_CUSTOM_FILTER_SECTION, + EXAMPLE_CUSTOM_POPUP, EXAMPLE_CUSTOM_RENDERER_WITH_DISABLED_ITEM, EXAMPLE_DISABLED_OPTIONS, EXAMPLE_GROUP_CHILDREN_OPTIONS, @@ -366,10 +367,21 @@ export const SelectShowcase = (props: SelectProps) => { { + return ( + +
{'---- Before Filter ----'}
+ {renderFilter()} +
{'---- After Filter, Before List ----'}
+ {renderList()} +
{'---- After List ----'}
+
+ ); + }, }} > @@ -411,30 +423,6 @@ export const SelectShowcase = (props: SelectProps) => {
- - { - return ( - -
{'---- Before Filter ----'}
- {renderFilter()} -
{'---- After Filter, Before List ----'}
- {renderList()} -
{'---- After List ----'}
-
- ); - }, - }} - > - - - - -
); }; diff --git a/src/components/Select/__stories__/constants.ts b/src/components/Select/__stories__/constants.ts index 7db104710d..94f495b465 100644 --- a/src/components/Select/__stories__/constants.ts +++ b/src/components/Select/__stories__/constants.ts @@ -285,3 +285,30 @@ const renderFilter: SelectProps['renderFilter'] = ({value, ref, onChange, onKeyD `; + +export const EXAMPLE_CUSTOM_POPUP = `const [value, setValue] = React.useState([]); + + + +`;