Skip to content

Commit

Permalink
fix(cascader): option value number warning (#1593)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lmmmmmm-bb authored Sep 3, 2022
1 parent c0fc6a4 commit 9e01fdb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cascader/components/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ export default defineComponent({
checked={node.checked}
indeterminate={node.indeterminate}
disabled={node.isDisabled() || ((value as TreeNodeValue[]).length >= max && max !== 0)}
name={node.value}
// node.value maybe string or number
name={String(node.value)}
title={inputVal ? getFullPathLabel(node) : node.label}
onChange={() => {
props.onChange();
Expand Down

0 comments on commit 9e01fdb

Please sign in to comment.