Closed grassick closed 8 years ago
If a click in the UI was what caused the clickout component to be rendered, it immediately fires.
Simple example:
class SelectExprComponent extends React.Component constructor: -> super @state = { active: false } handleActivate: => @setState(active: true) handleDeactivate: => @setState(active: false) render: -> if @state.active R ClickOutHandler, onClickOut: @handleDeactivate, H.input type: "text", initialValue: "" else H.a onClick: @handleActivate, "Select..."
Will immediately flip back to inactive state because click that happened before ClickOutHandler was created is still propagating up to the window.
I have a pull request for this that I'll put up shortly.
If a click in the UI was what caused the clickout component to be rendered, it immediately fires.
Simple example:
Will immediately flip back to inactive state because click that happened before ClickOutHandler was created is still propagating up to the window.
I have a pull request for this that I'll put up shortly.