hparton / react-native-merlin Goto Github PK
View Code? Open in Web Editor NEW๐ง Simple web-like forms in react native.
License: MIT License
๐ง Simple web-like forms in react native.
License: MIT License
Initial examples I can think of:
We currently have a way to add errors but no way to clear them.
Currently working on this on a branch but ran into the usual issues with swapping from synchronous to async. Needs a bit more work then will push it up and write some docs for it.
const nextFocusableInput = nextInputs.find( (element) => inputRefs[element.props.name]?.current?.focus )
This would ignore the next input and just submit the form, not ideal but would stop the error from happening. The other solution would be to look for input children in a custom component with a ref.
It would be nice to have support for disabled
on Form.Input
to be more in line with HTML forms.
Currently in the example pet.name
would set the form values to:
{
'pet.name': 'Example'
}
It should be resolving to:
{
pet: {
name: 'Example'
}
}
Not sure if it's worth adding support for array format to the names at the same time since we will essentially be parsing the dot notation into that.
Not sure if this should live on the input itself and change the text that gets saved to the errors or if it should be a prop on the Form.Error
to modify the output. Putting it on the error feels cleaner as the inputs already have a lot of props but then I'm not sure how we would then support passing custom errors to custom input components.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.