Skip to content
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

Add onCreate/onDestroy callbacks and update flatpickr #91

Merged
merged 3 commits into from May 9, 2019
Merged

Add onCreate/onDestroy callbacks and update flatpickr #91

merged 3 commits into from May 9, 2019

Conversation

emilos
Copy link
Contributor

@emilos emilos commented May 9, 2019

The PR includes 2 callbacks that can be used e.g. for referencing the datepicker instance. It allows you to create custom UIs by using methods exposed by flatpickr.

I thought of exposing an api but react-flatpickr seems to be a really thin layer over the lib so I thought this is the approach that is more flexible long term.

Thanks!

@jacobmischka
Copy link
Collaborator

Seems good to me, except I wonder if the onDestroy callback should fire before flatpickr.destroy is called?

@emilos
Copy link
Contributor Author

emilos commented May 9, 2019

@jacobmischka that makes a lot of sense as a place for additional cleanup if necessary. I've pushed a new commit

@jacobmischka jacobmischka merged commit 19c3712 into haoxins:master May 9, 2019
@jacobmischka
Copy link
Collaborator

Hey @haoxins, what do you think about adding @emilos as a collaborator? Would save us the trouble from having to merge all his good PRs and publish new versions 😉

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.

None yet

2 participants