VSTextField icon indicating copy to clipboard operation
VSTextField copied to clipboard

Textfield does not always use full text

Open bmcurutan opened this issue 6 years ago • 2 comments

The first time the cell is initialized, the values load fine (textfield text was set from database - not entered this time)

Actual value: "+14153211234"
Textfield value: "14153211234"
Displayed textfield value: "+1 (415) 321-1234"

After dequeuing the cell in the tableView, the values are different

Actual value: "+14153211234"
Textfield value: "1415321"
Displayed textfield value: "+1 (415) 321"

(FYI when I remove the formatting, the text is no longer cut off - but obviously I need the formatting ultimately)

bmcurutan avatar Mar 05 '18 23:03 bmcurutan

Thank you for the bug report. Could please provide more context on how the value is actually set?

VojtaStavik avatar Mar 07 '18 11:03 VojtaStavik

I was able to repro it with hardcoded data e.g., textField.text = "+14153211234"

First time cell is used, data loads fully and in correct format. After dequeuing the cell and reloading the table view (new data), then going back to the original case with textField.text = "+14153211234", the data is not loaded fully, but the format is still correct

bmcurutan avatar Mar 07 '18 23:03 bmcurutan