Skip to content

Commit d468b8a

Browse files
authored
docs(ComboBox): add group example (SAP#6497)
1 parent 40a180a commit d468b8a

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

packages/main/src/webComponents/ComboBox/ComboBox.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ All available filter types controlled by the `filter` prop.
3131

3232
<Canvas of={ComponentStories.FilterTypes} />
3333

34+
## ComboBox with ComboBoxItemGroups
35+
36+
<Canvas of={ComponentStories.WithGroups} />
37+
3438
<Markdown>{SubcomponentsSection}</Markdown>
3539

3640
## ComboBoxItem

packages/main/src/webComponents/ComboBox/ComboBox.stories.tsx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import employeeIcon from '@ui5/webcomponents-icons/dist/employee.js';
44
import { FlexBox } from '../../components/FlexBox/index.js';
55
import { FlexBoxDirection, FlexBoxJustifyContent } from '../../enums/index.js';
66
import { ComboBoxItem } from '../ComboBoxItem/index.js';
7+
import { ComboBoxItemGroup } from '../ComboBoxItemGroup/index.js';
78
import { Icon } from '../Icon/index.js';
89
import { Label } from '../Label/index.js';
910
import { ComboBox } from './index.js';
@@ -41,6 +42,24 @@ export const Default: Story = {
4142
}
4243
};
4344

45+
export const WithGroups: Story = {
46+
render(args) {
47+
return (
48+
<ComboBox {...args}>
49+
<ComboBoxItemGroup headerText="Group 1">
50+
<ComboBoxItem text="ComboBox Entry 1" />
51+
<ComboBoxItem text="ComboBox Entry 2" />
52+
</ComboBoxItemGroup>
53+
<ComboBoxItemGroup headerText="Group 2">
54+
<ComboBoxItem text="ComboBox Entry 3" />
55+
<ComboBoxItem text="ComboBox Entry 4" />
56+
<ComboBoxItem text="ComboBox Entry 5" />
57+
</ComboBoxItemGroup>
58+
</ComboBox>
59+
);
60+
}
61+
};
62+
4463
export const FilterTypes: Story = {
4564
render: () => {
4665
return (

0 commit comments

Comments
 (0)