Skip to content
New issue

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

[switch] 表单reset时switch无变化 #3164

Open
langziyang opened this issue Oct 29, 2024 · 2 comments
Open

[switch] 表单reset时switch无变化 #3164

langziyang opened this issue Oct 29, 2024 · 2 comments
Labels
example Something about example

Comments

@langziyang
Copy link

tdesign-react 版本

1.9.2

重现链接

No response

重现步骤

<Form
            layout='inline'
            form={form}
            initialData={{...search}}
            className='items-center'
            labelWidth={'auto'}
            labelAlign='right'
        >
<Form.FormItem
                                name={item.name}
                                label={item.label}
                                key={index}
                            >
                                <Switch  label={['是', '否']}/>
                            </Form.FormItem>
<Button onClick={()=>form.reset()}>搜索</Button>
</Form>

当调用form.reset()时,input可以清空,但是switch不能从是变为否

期望结果

期望可以像input一样重置

实际结果

No response

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

No response

Copy link
Contributor

👋 @langziyang,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@HaixingOoO HaixingOoO added the example Something about example label Nov 4, 2024
@HaixingOoO
Copy link
Collaborator

可以提供一下例子?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
example Something about example
Projects
None yet
Development

No branches or pull requests

2 participants