Skip to content

Commit e6c22e4

Browse files
committed
fix: dropdown v2
1 parent 19429a2 commit e6c22e4

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/components/Dropdown/Dropdown.stories.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,23 @@ import DropdownV2 from './DropdownV2';
99
const list: DropDownItem[] = [
1010
{
1111
id: 'A001',
12+
value: 'A001',
1213
name: 'Distributor',
13-
value: 'Distributor',
1414
},
1515
{
1616
id: 'A002',
17+
value: 'A002',
1718
name: 'Distributor A',
18-
value: 'Distributor-A',
1919
},
2020
{
2121
id: 'A003',
22+
value: 'A003',
2223
name: 'Distributor B',
23-
value: 'Distributor-B',
2424
},
2525
{
2626
id: 'A004',
27+
value: 'A004',
2728
name: 'Distributor C',
28-
value: 'Distributor-C',
2929
},
3030
];
3131

src/components/Dropdown/DropdownV2.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ const DropdownV2: React.VFC<DropDownProps> = (props) => {
148148
onClick={handleOnClickSelect}
149149
{...otherProps}
150150
>
151-
{selectedId ?? placeholder}
151+
{selectedItem?.name ?? placeholder}
152152
<Icon className="Dropdown-icon">
153153
{isOpen ? <KeyboardArrowUp /> : <KeyboardArrowDown />}
154154
</Icon>

0 commit comments

Comments
 (0)