🔆Click Here for Ionic Framework ReactJS and VueJS Tips/Tutorials?🔆
This is a quick post showing quickly how to make latest version of Re...
For further actions, you may consider blocking this person and/or reporting abuse
Saw this issue on Stackoverflow, stackoverflow.com/questions/630772...
here is a workaround
You can just add the interface...
and then set the code
Tried using interface for email field But still getting "Property 'onChange' does not exist on type"
in here
render={({ onChange, onBlur, value }) => (
Thank you for updating this. How would you go about testing this component? I have a simple Ionic Text Input component wrapped in a Controller just like the example above.
I've tried to use the example from this article:
I've also tried this (since ion input components have a
detail
property that specifies the value of the input:None of these methods get me what I need which is the value for these inputs being updated in the test. Any ideas?
You can probably do debug() from testing library after each fired event and see if the thing changed at all to investigate
I did do that, but it didn't change.
put the id on the
Controller
and fire aonChange
event don't use the ionic eventsWhen I moved the
data-testid='input-email'
to the Controller component wrapper, now I get an error in the test:TestingLibraryElementError: Unable to find an element by: [data-testid="input-email"]
I'm assuming because it is a custom component.
can you put a simple project together on stackblitz?
Im curious what came of this - having the same issues :(
Hi @aaronksaunders , I'm having an issue with Ionic 7, react-hook-form, and modals. If I submit the page and it finds errors, the error messages do not disappear even though I fix the error. Also, it can continue. I've watched several of your videos and read through many of your post but I cannot see what is wrong. See my code below. Let me know if you have any other suggestions I can try. Thanks in advance!
stackblitz code
Sorry @aaronksaunders, the link above was for the app and not the code. Here's the code link:
code
Hello, How do you reset the form ? Or how do you set values to the form (with a proper render of the form ?)
you reset the form using the
reset
method from the hook... you set the form using the default values, it is funny that you asked because i was working on a blog post about that!!dev.to/aaronksaunders/using-contex...
Thanks for this quick update