|
Hi, since I managed with your help to pass correct viewModel and data to my EditForm, I still cannot edit Ints or using a picker. There is the code
I tried to use my own init-function to set values. This works as far as I can see. Editing the food.name works fine, but editing food.amount(Int) or food.amountunit (based on a Picker) does not work. I stepped into Save-Action in the Debugger -> There are still the values I set within init set. |
|
Not sure but in you have
Also try to have the It just a thought as the food name updates |
|
Thanks. The enum binding is now working properly, but binding an Int still does not work. I try it like this....
Even the textfield which outputs "Resulting (amount)" is never updated. The field is initialized correctly with 50. But when you enter other numbers nothing, really nothing changes. |
|
I found a workaround now and therefore created a new Controll named IntField:
Usage of IntField:
But I still do not understand, why working with value and formatter does not work at all. |
SPONSORED Still waiting on your CI build? Speed it up ~3x with Blaze - change one line, pay less, keep your existing GitHub workflows. First 25 HWS readers to use code HACKING at checkout get 50% off the first year. Try it now for free!
Sponsor Hacking with Swift and reach the world's largest Swift community!
This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.