We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
react-vant
react-vant-icons
3.3.5
No response
默认值 defaultValue 依然有问题
const areas = [ { text: '武汉', value: 1 }, { text: '长沙', value: 2 }, { text: '成都', value: 3 }, ]
const [value, setValue] = useState<Record<string, string | number>>({})
<DropdownMenu className='areas' value={value} defaultValue={{text: '武汉', value: 1}} onChange={v => setValue(v)}> <DropdownMenu.Item name='value1' options={areas}/> </DropdownMenu>
设置了默认值,但是依然显示 “请选择”
The text was updated successfully, but these errors were encountered:
<DropdownMenu.Item name='value1' options={areas}/> </DropdownMenu> 把value1改成value即可
<DropdownMenu.Item name='value1' options={areas}/> </DropdownMenu>
Sorry, something went wrong.
No branches or pull requests
Which React Vant packages are impacted?
react-vant
(React Vant core)react-vant-icons
(React Vant Icon)What version of React Vant are you using?
3.3.5
Reproduce live demo(codesandebox or stackblitz)?
No response
Descripition
默认值 defaultValue 依然有问题
const areas = [ { text: '武汉', value: 1 }, { text: '长沙', value: 2 }, { text: '成都', value: 3 }, ]
const [value, setValue] = useState<Record<string, string | number>>({})
<DropdownMenu className='areas' value={value} defaultValue={{text: '武汉', value: 1}} onChange={v => setValue(v)}> <DropdownMenu.Item name='value1' options={areas}/> </DropdownMenu>
设置了默认值,但是依然显示 “请选择”
The text was updated successfully, but these errors were encountered: