Skip to content

Commit

Permalink
fix: unrecognized prop warning in form autosuggest
Browse files Browse the repository at this point in the history
  • Loading branch information
syedsajjadkazmii committed Feb 13, 2024
1 parent 2801667 commit b3aa9ca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Form/FormAutosuggest.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,13 @@ const FormAutosuggest = forwardRef(

function getItems(strToFind = '') {
let childrenOpt = React.Children.map(children, (child) => {
const { children: childChildren, onClick, ...rest } = child.props;
const { children: childchildren, onClick, ...rest } = child.props;
const menuItemId = child.props.id ?? uuidv4();

return React.cloneElement(child, {
...rest,
childChildren,
'data-value': childChildren,
childchildren,
'data-value': childchildren,
onClick: (e) => handleItemSelect(e, onClick),
id: menuItemId,
onFocus: () => handleMenuItemFocus(menuItemId),
Expand Down

0 comments on commit b3aa9ca

Please sign in to comment.