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
Describe the bug 以下两种方式 当依次点击 A-C-B 时 第三次onchange 结果 分别是 [1,2,3] - [1,3,2];期望 始终为[1,2,3]
const Demo = () => <Checkbox.Group onChange={(e) => { mockChange(e); }} options={[{ value: 1, label: 'A' }, { value: 2, label: 'B' }, { value: 3, label: 'C' }]} />
<Checkbox.Group onChange={(e) => { mockChange(e); setVal(e); }} value={val}> <Checkbox value={1}>A</Checkbox> <Checkbox value={2}>B</Checkbox> <Checkbox value={3}>C</Checkbox> </Checkbox.Group>
错误原因为:
const opts = getOptions(); onChange?.( newValue .filter((val) => registeredValues.indexOf(val) !== -1) .sort((a, b) => { const indexA = opts.findIndex((opt) => opt.value === a); const indexB = opts.findIndex((opt) => opt.value === b); return indexA - indexB; }) );
getOptions 方法没有收集JSX写法的 props
getOptions
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
以下两种方式 当依次点击 A-C-B 时 第三次onchange 结果 分别是 [1,2,3] - [1,3,2];期望 始终为[1,2,3]
错误原因为:
getOptions
方法没有收集JSX写法的 propsScreenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: