Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InlinePickerRowFormer: how to select a picker item programmatically #81

Closed
HaikuOezu opened this issue Jun 10, 2018 · 5 comments
Closed
Labels

Comments

@HaikuOezu
Copy link

Hello,
I'm using former to allow the user to edit some data that is persisted locally, as such when initializing my view controller I need former rows to display the current values of the object
I have a InlinePickerRowFormer that allows the user to choose between multiple possible values, and I have noticed that no matter what I do it will always default to the first item in the picker, even if selectedRow is not 0

To set the current row I call
$0.selectedRow
Inside the configure block, but the row still defaults to the first option

I have tried using update, cellUpdate and even altering the formDisplayLabel() directly but nothing works, I can change the font of the display label but not the actual text.

I am positively stumped, I have no idea how to fix this... am I missing something?

@HaikuOezu
Copy link
Author

HaikuOezu commented Jun 10, 2018

At the moment I have deployed a fix that I'm not very fond of because it requires changing Former's source as indicated in issue #78

I would love to know if there's a cleaner way around the issue

@B0Dim
Copy link

B0Dim commented Jul 17, 2018

+1

1 similar comment
@Daxito
Copy link

Daxito commented Jul 17, 2018

+1

@raulastu
Copy link

1

@ZacharyKhan
Copy link
Collaborator

This issue should be solved in #88

If you are still having issues, please submit a new issue using the template below:

https://github.com/ra1028/Former/issues/new?template=bug_report.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants