DouyinFE / semi-design

🚀A modern, comprehensive, flexible design system and React UI library. 🎨 Provide more than 3000+ Design Tokens, easy to build your design system. Make Semi Design to Any Design. 🧑🏻‍💻 Design to Code in one click
https://semi.design
Other
8.47k stars 716 forks source link

[BUG] PinCode初值为''时onChange不触发 #2502

Closed koderx closed 1 month ago

koderx commented 1 month ago

Is there an existing issue for this?

Which Component

PinCode

Semi Version

2.66.1

Current Behavior

image

应该是受控判定有问题 https://github.com/DouyinFE/semi-design/blob/d279f80d872288b0034ca86df6358ffeecbf0e03/packages/semi-foundation/pincode/foundation.ts#L45C8-L45C70

const isControlledComponent = Boolean(this.getProp("value"));

Expected Behavior

const isControlledComponent = this._isInProps("value");

Steps To Reproduce

No response

ReproducibleCode

No response

Environment

- OS:mac
- browser:chrome

Anything else?

No response