pro-components icon indicating copy to clipboard operation
pro-components copied to clipboard

🧐[问题] protable使用cancelEditable取消当前行的编辑,我该怎样将输入框的值重置为编辑前的值?

Open vision-llz opened this issue 1 year ago • 0 comments

提问前先看看:

https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md

🧐 问题描述

当我编辑当前行的文本框,然后使用cancelEditable取消编辑,再次进入当前行编辑状态,当前文本框会显示编辑后的值。我该怎样将文本框的值重置为原始数据?

💻 示例代码

<a onClick={() => { if (currentEditKey?.current) { actionRef?.current?.cancelEditable(currentEditKey?.current); } actionRef?.current?.startEditable(record.id); currentEditKey.current = record.id; }}

修改

vision-llz avatar Jan 19 '24 05:01 vision-llz