Skip to content

disable Search 组件的时候,应该同时禁用 Search 按钮 #10040

Closed
@jasonxia23

Description

@jasonxia23
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

3.4.1

Environment

浏览器

Reproduction link

https://ant.design/components/input-cn/

Steps to reproduce

<Input.Search /> 设置 disabled 属性只会禁用输入框,而不会禁用按钮,这会造成潜在的问题

What is expected?

disable Search 组件的时候,应该同时禁用 Search 按钮

What is actually happening?

按钮不会被禁用,造成点击按钮的时候,相应的回调会被触发(虽然理论上可以拦截这个回调逻辑的执行,但是这样的设计并不优雅)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions