Skip to content

Commit 19429a2

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

File tree

3 files changed

+2
-7
lines changed

3 files changed

+2
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@beeinventor/dasiot-react-component-lib",
3-
"version": "1.2.3",
3+
"version": "1.2.4",
44
"module": "lib/index.js",
55
"types": "lib/index.d.ts",
66
"files": [

src/components/Dropdown/Dropdown.stories.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Dialog, DialogContent } from '@mui/material';
22
import { Meta, Story } from '@storybook/react';
3-
import React, { useEffect, useState } from 'react';
3+
import React, { useState } from 'react';
44
import Button from '../Button';
55
import Dropdown from './Dropdown';
66
import { DropDownItem, DropDownProps } from './Dropdown.type';
@@ -155,10 +155,6 @@ Reset.parameters = {
155155
export const Version2: Story<DropDownProps> = (args) => {
156156
const [selectedId, setSelectedId] = useState<string | undefined>();
157157

158-
useEffect(() => {
159-
console.log(selectedId);
160-
}, [selectedId]);
161-
162158
return (
163159
<div>
164160
<DropdownV2

src/components/Dropdown/DropdownV2.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ const DropdownV2: React.VFC<DropDownProps> = (props) => {
109109

110110
const handleOnClick = (item: DropDownItem) => {
111111
setIsOpen(false);
112-
setSelectedItem(item);
113112
onSelect(item.value, item);
114113
};
115114

0 commit comments

Comments
 (0)