-
Notifications
You must be signed in to change notification settings - Fork 6
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
Input specific propType source #75
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not checked everything yet, but here are some initial comments :)
src/lib/props/property-sources/createFormPropertySource.test.ts
Outdated
Show resolved
Hide resolved
src/lib/props/property-sources/createFormPropertySource.test.ts
Outdated
Show resolved
Hide resolved
That's strange, I will need to look at that (commented the same)
That's fine, I added a comment on the usage of
I think just these two:
Jep you're right, this doesn't make much sense. I would leave it out – and only add it back if someone finds a reason to use it :) |
Docs were updated 📝 |
src/lib/props/property-sources/createFormPropertySource.test.ts
Outdated
Show resolved
Hide resolved
src/lib/props/property-sources/createFormPropertySource.test.ts
Outdated
Show resolved
Hide resolved
src/lib/props/property-sources/createFormPropertySource.test.ts
Outdated
Show resolved
Hide resolved
src/lib/props/property-sources/createFormPropertySource.test.ts
Outdated
Show resolved
Hide resolved
Add the 'formData' boolean property to the 'form' source option
src/lib/props/property-sources/createFormPropertySource.test.ts
Outdated
Show resolved
Hide resolved
src/lib/props/property-sources/createFormPropertySource.testutils.ts
Outdated
Show resolved
Hide resolved
src/lib/props/property-sources/createFormPropertySource.testutils.ts
Outdated
Show resolved
Hide resolved
… type is not an Object and it's trying to get FormData
…uban into feature/input-prop-type-source
Notes:
This is a WIP PR, there's a few things that I don't fully understand and need feedback about
PropTypeInfo
and setname
as optional, because for the form propType source it can be optional, without changing that it was imposible to create an unnamed source, this change forced me to update the other ...PropertySource() functions, adding a!
at the end ofpropInfo.source.name
, all tests are passing but I'm not 100% sure about this type changeflow
function from lodash I call them all one by one,flow
is just a pipe<input type="file"/>
, I added a function insidecreateFormPropertySource()
to check for file inputs, but testing it I realized it's not very useful... because it is impossible to set the value of an input file directly, so initially when setting the prop the value will be undefined, so from the rendered HTML from a CMS we cannot get an initial value... It's working, but I don't fully understand how we could use it in an app, i will rather just bind a change event to the inputI think that's it, please let me know your thoughts