Skip to content

Can the change event of inputNumber reveal the value before the change #5033

@Hilshire

Description

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

What problem does this feature solve?

思考这样的场景:用户有24个点数可以分配给6个属性,当点数用完时就不可以再增加属性了。这时候也就不应该可以使用 InputNumber 的增加按钮改变数值了。可是此时用户依然可以减少属性,减少按钮应该依然有效。

这时候很容易想到使用 change 做处理,但是 change 没有暴露改变前的值,没有一个简单的方法知道用户到底增加了值还是减少了值

What does the proposed API look like?

当前的API如下:

Function(value: number | string)

参考 Element,在原有的基础上:

Function(value: number | string, oldValue: number | string)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions