You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In ShortTextCell and UrlCell, when editing a cell and typing in the middle of the text, the caret jumps to the end after each keystroke. The useEffect that focuses the cell and sets the selection has value in its dependency array, and onInput calls setValue(currentValue) on every change. So each keystroke updates value, re-runs the effect, and the effect’s range.collapse(false) moves the selection to the end of the content.
Describe the bug
In
ShortTextCellandUrlCell, when editing a cell and typing in the middle of the text, the caret jumps to the end after each keystroke. TheuseEffectthat focuses the cell and sets the selection hasvaluein its dependency array, andonInputcallssetValue(currentValue)on every change. So each keystroke updatesvalue, re-runs the effect, and the effect’srange.collapse(false)moves the selection to the end of the content.How to reproduce
Name,Email, orWebsiteLink to reproduction
https://tablecn.com/data-grid
Additional information
TableCN.mp4