Open solomonhawk opened 8 years ago
Can you give me some examples of what you'd do with these hooks (aside from what they're doing by default)?
I think onDaySelected
is the one I would immediately be interested in, because in same cases, once the day is selected, I would want to update part of the UI, re-validate a form, or submit an AJAX response.
This isn't possible with the current state of ca11y, since I can't listen for changes to the input value that are triggered by the library.
Confirmed; I'm trying to use ca11y on a react project that submits data onBlur
, but the onBlur
never triggers with ca11y. I will start a branch that adds onDaySelected()
, but I won't PR/merge it; I'll just install ca11y from that branch since I need this asap.
This is dirty, but, just for future reference: https://github.com/vigetlabs/ca11y/compare/powwow-lifecycle-hook-DO-NOT-DELETE
Related to #13
If this package goes the route of #13 and the DOM glue is left as an external concern then we don't need to worry about proxying handlers for things like onBlur, onFocus, etc. because that can be left to user-land code.
Purpose:
Allow users to tie their code into more of the internal events that Ca11y uses.
Could include some of the following events:
onPrevMonth()
onNextMonth()
onDaySelected()
onClose()
onOpen()
I think these callbacks should all be configured under options.