Skip to content

Commit 3890b17

Browse files
zyl-edison-telustheetrain
authored andcommitted
fix(community-input-group): update input id
1 parent 7faa834 commit 3890b17

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/InputGroup/InputGroup.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const InputGroup = ({
2626
}) => {
2727
const inputRef = createRef()
2828
const [inputValue, setInputValue] = useState('')
29-
const inputId = useMemo(() => (label ? uniqueId(label) : id), [label, id])
29+
const inputId = useMemo(() => id || (label && uniqueId(label)) || undefined, [label, id])
3030

3131
useEffect(() => {
3232
if (defaultValue) {

0 commit comments

Comments
 (0)