SwiftyFORM icon indicating copy to clipboard operation
SwiftyFORM copied to clipboard

Select All on focus change

Open justdan0227 opened this issue 2 years ago • 3 comments

Is there a way to set a field as SELECT ALL when focus change to it?

justdan0227 avatar Sep 30 '21 14:09 justdan0227

What do you mean with "SELECT ALL", like a text where all text is selected?

neoneye avatar Sep 30 '21 14:09 neoneye

Yes sorry so I would like to have each field to be SELECT ALL when focus goes to it so you can just click and enter vs having to press the X to clear the current value.

justdan0227 avatar Sep 30 '21 14:09 justdan0227

In TextFieldFormItem and TextViewFormItem, maybe add an enum ala tapBehavior = .selectText.

In TextFieldCell.handleTap() deal with the tapBehavior and select all the text.

PR is welcome.

neoneye avatar Sep 30 '21 15:09 neoneye