Coder Social home page Coder Social logo

[FormItem] FormItem组件会用自己的缺省值覆盖用户的props,导致初始化时丢失用户原来的状态 about tdesign-react HOT 4 OPEN

broxiang avatar broxiang commented on June 1, 2024
[FormItem] FormItem组件会用自己的缺省值覆盖用户的props,导致初始化时丢失用户原来的状态

from tdesign-react.

Comments (4)

HaixingOoO avatar HaixingOoO commented on June 1, 2024 1

@broxiang 地址:https://tdesign.tencent.com/react/components/form?tab=demo#faq
image

from tdesign-react.

github-actions avatar github-actions commented on June 1, 2024

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

from tdesign-react.

broxiang avatar broxiang commented on June 1, 2024

@HaixingOoO 这种办法虽然是能解决一部分问题,但是感觉这种设计略微不太合理,用initialData貌似解决不了一个FormItem中包裹多个Input的场景(每个Input的初始值不同),包括文档下面提到的只想用Form来布局的场景,也必须要在内部套一层div,不然也没办法达到纯净的布局作用,这个设计有些侵入业务,略微超出了UI组件的职责范畴(假设是存量系统做迁移,这种也是一种阻力),是否可以考虑增加一个控制属性来关掉这个特性呢~

image image image

from tdesign-react.

HaixingOoO avatar HaixingOoO commented on June 1, 2024

@broxiang 我们讨论一下,感谢!!!

from tdesign-react.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.