reactjs - 更改值在反应管理员
问题描述
目前我决定将 react-admin 用于一个项目,优秀的 Web 框架,在我的情况下,问题是我无法在我的特定情况下更改任何输入的值和 .
在引用autocompletearrayinput的文档中,我无法澄清我的疑问
谷歌给了我线索,但没有一个对我有用,例如最直观的value={textValue}:
选项1:
<ReferenceArrayInput
/**... */
value={textValue}
/**... */
>
<AutocompleteArrayInput optionText={"product_name"} />
</ReferenceArrayInput>;
选项 2:这有效,但仅在第一次加载时不允许再次进行更改。
<ReferenceArrayInput
/**... */
defaultValue={textValue}
/**... */
>
<AutocompleteArrayInput optionText={"product_name"} />
</ReferenceArrayInput>;
最后是这个:
选项 3:
<ReferenceArrayInput
/**... */
input={{value: textValue}}
/**... */
>
<AutocompleteArrayInput optionText={"product_name"} />
</ReferenceArrayInput>;
有人请告诉我一些方法。谢谢。
解决方案
推荐阅读
- html - 服务器端渲染,延迟加载响应图像,正确的做法
- google-colaboratory - 如何限制 Google Colaboratory 中的单元格文本输出?
- python - 神经网络的输入大小不匹配
- node.js - 将数据推送到弹性搜索索引时拒绝 Firebase 中的映射更新错误
- x86 - 为什么“i586”指的是 Pentium 1,为什么“i686”指的是 Pentium Pro?
- javascript - 如何强制禁用 Babeljs 生成的“使用严格”模式
- sql - 为什么从 Query 和 SSMS 备份时数据库备份大小不同?
- angular - 材质对话框:使用多个对话框实例管理点击事件的 Z-index
- angular - 如何使用一些参数从另一个 Web 应用程序启动 Angular 应用程序?
- python - 在引用另一列中的标签时迭代一列中的项目