Skip to content

Commit

Permalink
docs: fix OnyxSelect multiselect example (#1221)
Browse files Browse the repository at this point in the history
Relates to
#565 (comment)
  • Loading branch information
larsrickert authored Jun 3, 2024
1 parent 697ffcd commit 18b2d97
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions packages/sit-onyx/src/components/OnyxSelect/OnyxSelect.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,16 @@ DEMO_OPTIONS.splice(6, 0, {
disabled: true,
});

const MULTISELECT_DEMO_OPTIONS = [
{
value: "disabled-2",
label: "Selected unavailable fruit",
disabled: true,
},
...DEMO_OPTIONS,
{ value: "long", label: "Option with a very long long long long long long long text" },
];

/**
* This example shows a default single select.
*/
Expand Down Expand Up @@ -127,18 +137,10 @@ export const WithMessage = {
export const Multiselect = {
args: {
...Default.args,
modelValue: [DEMO_OPTIONS[0], DEMO_OPTIONS[1]],
modelValue: [MULTISELECT_DEMO_OPTIONS[0], MULTISELECT_DEMO_OPTIONS[1]],
multiple: true,
withCheckAll: true,
options: [
{
value: "disabled-2",
label: "Selected unavailable fruit",
disabled: true,
},
...Default.args.options,
{ value: "long", label: "Option with a very long long long long long long long text" },
],
options: MULTISELECT_DEMO_OPTIONS,
},
} satisfies Story;

Expand Down

0 comments on commit 18b2d97

Please sign in to comment.