[Bugfix] Fix that we have to click twice to close gyp-closable after click in wrapped component #262
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
修正在
<SelectRow>
開啟選項的 popover 並在裡面點選後,在外面按一下不會關掉 popover 的問題,必須按兩下。這是因為修正了 #250 後,改變了 DOM 的結構讓 gyp-closable 不再是
WrappedComponent
的父元素,卻忘了拿掉原本在<WrappedComponent>
內部點擊、觸發 gyp-closable click event handler 時不要執行 onClose 的機制。現在在<WrappedComponent>
內點擊本來就不會觸發 gyp-closable 的 click handler,所以也不用額外這樣做。實作上就是拿掉
closable
的this.insideClick
變數。Changes
closable
裡面的this.insideClick
。Risk
所有使用
<Popover>
的 component(在 gypcrete 裡面只有<SelectRow>
)TODOs