Closed susiwen8 closed 5 months ago
PR preview has been successfully built and deployed to https://antd-mobile-preview-pr-6522.surge.sh
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
b431a18
) 92.27% compared to head (a4e639a
) 92.27%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Why not ref.current.nativeElement.setSelectionRange
?
Why not
ref.current.nativeElement.setSelectionRange
?
Right, that works too!
Background: In my project, there is a need to insert some characters into a textarea using JavaScript. Currently, the
TextArea
component doesn't provide the setSelectionRange method, which results in the cursor not being positioned after the inserted characters. This leads to a poor user input experience. Therefore, in this PR, I have added this method.