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
This is great for clearing the text field when the user calls reloadData, but when we're laying out because of rotation, it causes us to lose our input.
Would you be open to a PR which keeps the existing behavior of clearing the inputTextField on reloadData, but keeps the entered text on relayout ?
The text was updated successfully, but these errors were encountered:
It turns out that the PR could be very simple.
We're already passing a boolean for whether to adjust the frame or not.
All the cases where we're adjusting the frame we also want the inputTextField cleared, so we could add a parameter to layoutInputTextFieldWithCurrentX & use that to clear/not-clear the text field.
I'll submit a PR. Hopefully you're open to the change.
walsh2000
pushed a commit
to walsh2000/VENTokenField
that referenced
this issue
Aug 27, 2015
This resolves issue venmo#76
When we are laying out subviews, we were already passing NO for adjustFrame.
When we are reloading data, we were already passing YES for adjustFrame.
It turns out that when we are not adjustingFrame, we do not want to clear the user-entered text, so reuse this boolean to keep from clearing the user text.
Hello
-[VENTokenField layoutInputTextFieldWithCurrentX:currentY:] clears inputTextField.text
This is great for clearing the text field when the user calls reloadData, but when we're laying out because of rotation, it causes us to lose our input.
Would you be open to a PR which keeps the existing behavior of clearing the inputTextField on reloadData, but keeps the entered text on relayout ?
The text was updated successfully, but these errors were encountered: