NG-ZORRO / ng-zorro-antd

Angular UI Component Library based on Ant Design
https://ng.ant.design
MIT License
8.88k stars 3.94k forks source link

动态设置nz-input-number组件的max,上下箭头的disable状态未更新 #8833

Open echolove38 opened 1 month ago

echolove38 commented 1 month ago

Reproduction link

https://ng-zorro-antd-ivy-irf9wr.stackblitz.io/

Steps to reproduce

输入框的初始最大值是31

输入框里输入30

点击set max 30按钮, up按钮还是可用状态,点击一下up按钮才变为disable状态

点击set max 31按钮,up按钮还是disable状态,但是点击up按钮以后,输入框的值会变成31

What is expected?

当max值变化的时候,up/down按钮的可用状态要及时更新

What is actually happening?

当max值变化的时候,up/down按钮的可用状态未能及时更新

Environment Info
ng-zorro-antd 13.4.0
Browser chrome
zorro-bot[bot] commented 1 month ago

Translation of this issue:

Dynamically set the max of the NZ-Input-Number component, the Disable status of the upper and lower arrows is not updated

REPRODUCTION LINK

[https://ng-zorro-mtd-IVY- IRF9wr.StackBlitz.io/] //ng-zorro-Ntd- IRF9wr.stackBlitz.io/))))))))))

STEPS To Reproduce

The initial maximum value of the input box is 31

Enter 30 in the input box 30

Click the SET MAX 30 button. The UP button is still available. Click the UP button to become Disable state

Click the SET MAX 31 button, the UP button is still Disable state, but after clicking the UP button, the value of the input box will become 31

What is exfected?

When the max value changes, the available state of the UP/DOWN button should be updated in time

What is actually happy?

When the max value changes, the available state of the UP/DOWN button fails to update in time

ENVIRONMENT Info
NG-Zorro-ATD 13.4.0
Browser Chrome
echolove38 commented 1 month ago

no one reply ?

Nicoss54 commented 2 weeks ago

@echolove38 let me check and reproduce, thanks for your patience