Close overlay with closeOnSelect if open prop is set#741
Close overlay with closeOnSelect if open prop is set#741danrot wants to merge 1 commit intoarqex:masterfrom danrot:close-on-select-with-open-prop
Conversation
|
The checklist says I should not include any built dist files, but if I don't the tests and therefore the precommit hook fail 😕 |
|
@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. |
|
@danrot You can use <ReactDateTime
onChange={this.handleClose}
{...otherProps}
/> |
|
@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. |
|
@arqex any update to this? |
|
@onlined the problem with the |

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