Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/SelectDropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const SelectDropdown = ({
rowStyle /* object */ /* style object for row */,
rowTextStyle /* object */ /* style object for row text */,
renderCustomizedRowChild /* function */ /* callback function recieves item and its index, this function should return React component as a child for customized row */,
isReset, // boolean, to call reset() when it true
}) => {
///////////////////////////////////////////////////////
const DropdownButton = useRef(); // button ref to get positions
Expand Down Expand Up @@ -157,6 +158,9 @@ const SelectDropdown = ({
setDropdownHEIGHT(150);
}
}, [dropdownStyle]);
useEffect(() => {
isReset && reset();
}, [isReset]);
///////////////////////////////////////////////////////
/* ******************** Methods ******************** */
const openDropdown = () => {
Expand Down