Skip to content

Commit 31923e4

Browse files
authored
chore: Fixed select stories groupBy issue (#1910)
1 parent 7962650 commit 31923e4

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

stories/select.stories.ts

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,12 @@ import {
55
} from '@igniteui/material-icons-extended';
66
import type { Meta, StoryObj } from '@storybook/web-components-vite';
77
import { html } from 'lit';
8-
98
import {
109
IgcIconComponent,
1110
IgcSelectComponent,
1211
defineComponents,
1312
registerIconFromText,
1413
} from 'igniteui-webcomponents';
15-
import { groupBy } from '../src/components/common/util.js';
1614
import {
1715
disableStoryControls,
1816
formControls,
@@ -265,8 +263,16 @@ const items = [
265263
>`
266264
);
267265

266+
type CountryInfo = {
267+
continent: string;
268+
country: string;
269+
value: string;
270+
selected: boolean;
271+
disabled: boolean;
272+
};
273+
268274
const countries = Object.entries(
269-
groupBy(
275+
Object.groupBy(
270276
[
271277
{
272278
continent: 'Europe',
@@ -310,9 +316,9 @@ const countries = Object.entries(
310316
selected: false,
311317
disabled: true,
312318
},
313-
],
314-
'continent'
315-
)
319+
] as CountryInfo[],
320+
(item) => item.continent
321+
) as Record<string, CountryInfo[]>
316322
);
317323

318324
export const Basic: Story = {

0 commit comments

Comments
 (0)