-
Notifications
You must be signed in to change notification settings - Fork 861
Conversation
danrot
commented
Oct 5, 2020
The checklist says I should not include any built dist files, but if I don't the tests and therefore the precommit hook fail 😕
danrot
commented
Oct 13, 2020
@arqex Any chance that this is merged? This is a breaking change, that would force me to rewrite quite a bit of my application logic.
onlined
commented
Oct 15, 2020
@danrot You can use onChange prop for your purpose, like this:
<ReactDateTime onChange={this.handleClose} {...otherProps} />
danrot
commented
Oct 16, 2020
@onlined I know that I could rewrite it this way, that's what I meant in my previous comment 🙂 I would just like to avoid it, and I still think that the behavior "fixed" in this PR is very confusing, and it was working differently in a previous version. In addition to that I cannot see how anybody would benefit from that change, so I guess it was on accident.
alexander-schranz
commented
Apr 22, 2021
@arqex any update to this?
alexander-schranz
commented
Apr 23, 2021
@onlined the problem with the onChange is that it also close automatically then when the time is changed and thats a behaviour you don't want e.g.:
Uh oh!
There was an error while loading. Please reload this page.
Description
I have adjusted the logic happening when the
onCloseSelectprop is set. It now also calls theonClosecallback if theopenprop is set to some value.Motivation and Context
In v2 of this library we were using this component somehow like this (simplified example):
This doesn't seem to work anymore in v3, because the
closeOnSelectprop does not have any effect if any value other thanundefinedis passed to theopenprop.If this PR is accepted, the
handleClosemethod will be called as expected. It is still in control of the rendering component if it changes the value passed to theopenprop, in case that was a concern.Checklist