neoneye / SwiftyFORM

iOS framework for creating forms
MIT License
1.08k stars 87 forks source link

Select All on focus change #64

Open justdan0227 opened 3 years ago

justdan0227 commented 3 years ago

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

neoneye commented 3 years ago

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

justdan0227 commented 3 years ago

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.

neoneye commented 3 years ago

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.