-
-
Notifications
You must be signed in to change notification settings - Fork 145
Modifying a 'FORMFields' within 'self.dataSource.allFields' doesn't update its respective 'self.dataSource.values' #563
Comments
Hi @sedwo, What about doing: [self.dataSource updateValuesWithDictionary:@{stringKey: newStringValue}]; Or could you share a bit more of your JSON structure? I think I could share an example on how to do this if I get some more info. |
Are you suggesting then:
My thought (and hope) was that Currently I'm experimenting with this snippet from other comments:
Does that method make sense? |
@sedwo what type of field is the one you're trying to update? https://github.com/hyperoslo/Form/blob/master/Source/Models/FORMField.h#L10-L24 |
At the moment just TEXT and DATE/TIME strings. |
I added the method:
to the Thank you kindly for your feedback. |
Gonna add a recommendation to the readme. |
fyi
|
My challenge is that when I update a value like this:
It doesn't reflect that updated new value within the
self.dataSource.values
container.As I need to update fields within a form that haven't yet been scrolled into view. And if they never are, then the data that gets saved is missing the updated new value.
I've hacked it by
But I would expect this to be embedded within the control. It looks ugly to wrap each modification like this.
Any other clever techniques on how to accomplish this ?
The text was updated successfully, but these errors were encountered: