Skip to content

Conversation

corupta
Copy link

@corupta corupta commented Mar 3, 2018

now, the module can be used with elements other than text input too,
also there's no need to import text input from this module anymore

@corupta
Copy link
Author

corupta commented Mar 3, 2018

missing readme tho

@zackify
Copy link
Owner

zackify commented Mar 5, 2018

What's the need for this, could you elaborate in the readme?

@corupta
Copy link
Author

corupta commented Mar 30, 2018

Hi, sorry for late reply. I loved your idea of the auto focus form and extended it to a general module that can use not only textinput but also with any other custom modules such as pickers and input element from react native elements, and etc.

I did a silly pull request though, and shared it before testing.

My idea was to why not use this for any component that implemets focus and onSubmit functionality.

And later by implementing focus and onsubmit functionality for the autofocus form component, those form components can be used in a nested behavior, too.

For example,

SomeComponent =
   <Form>
     <TextInput />
     <TextInput />
   </Form>

Then,

App =
<Form>
  <SomeComponent />
  <SomeComponent />
</Form>

Too, has the auto focus function everywhere.
It needs a good readme, and more testing, but it does work. However, right now I'm getting big performance issues when re-rendering everything the children gets to be recloned and their autofocus functionality gets recalculated.

Thus, I have decided to quit this implementation for a while. You can close the pull request. I may in the future re-implement this module in some new way. But not anytime sooner.

Have a nice day!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants