小编Ann*_*erg的帖子

你能在 React 中运行输入值中的函数吗?

我想运行一个函数并在我的输入值中传递一些参数,但它给了我这个错误: Invalid value for prop值on <input> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM.

我记得曾经在某处读过您可以在 中使用函数value,但这对我不起作用。还有别的办法吗。

value={() => this.handleMapping(row.servername,  "Data Source Server")} 
Run Code Online (Sandbox Code Playgroud)

错误:Invalid value for prop值on <input> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM.

reactjs redux react-redux

4
推荐指数
1
解决办法
4201
查看次数

标签 统计

react-redux ×1

reactjs ×1

redux ×1