diff --git a/packages/grafana-ui/src/components/Combobox/MultiCombobox.mdx b/packages/grafana-ui/src/components/Combobox/MultiCombobox.mdx new file mode 100644 index 00000000000..ad7dd6145ff --- /dev/null +++ b/packages/grafana-ui/src/components/Combobox/MultiCombobox.mdx @@ -0,0 +1,20 @@ +import { Meta, Preview, ArgTypes } from '@storybook/blocks'; + +import { MultiCombobox } from './MultiCombobox'; + + + +# MultiCombobox + +The behavior of the MultiCombobox is similar to that of the Combobox, but it allows you to select multiple options. For all non-multi behaviors, see the Combobox documentation. + +## "All" functionality + +Use the prop `enableAllOption` to show the "All" option. + +- If no filtering is applied, selecting "All" will select all options, returning the same array as the `options` prop. +- With filtering, selecting "All" will choose the filtered subset of options. + +## Props + + diff --git a/packages/grafana-ui/src/components/Combobox/MultiCombobox.internal.story.tsx b/packages/grafana-ui/src/components/Combobox/MultiCombobox.story.tsx similarity index 98% rename from packages/grafana-ui/src/components/Combobox/MultiCombobox.internal.story.tsx rename to packages/grafana-ui/src/components/Combobox/MultiCombobox.story.tsx index 2022354a901..86c7e94d2f0 100644 --- a/packages/grafana-ui/src/components/Combobox/MultiCombobox.internal.story.tsx +++ b/packages/grafana-ui/src/components/Combobox/MultiCombobox.story.tsx @@ -6,12 +6,18 @@ import { ComponentProps } from 'react'; import { Field } from '../Forms/Field'; import { MultiCombobox } from './MultiCombobox'; +import mdx from './MultiCombobox.mdx'; import { generateOptions, fakeSearchAPI, generateGroupingOptions } from './storyUtils'; import { ComboboxOption } from './types'; const meta: Meta = { title: 'Forms/MultiCombobox', component: MultiCombobox, + parameters: { + docs: { + page: mdx, + }, + }, }; const loadOptionsAction = action('options called');