Adding another inidcator as a cusom button #4925
-
Hello, im trying to add 'another indicator to the dropdown select which will behave as an independent button with its own click handler. I was trying to stopPropagation() on the button click but it still opens the menu whenever a click is preformed whitihng the indicator section. is there any way to override it ? or shoul i add it under another compoenent. here si what im trying to achive |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
@cubecleveland there are a few events that need to be prevented from propagating to the Control component. Specifically, Here is an example codesandbox that should work for your use-case. https://codesandbox.io/s/react-select-add-new-indicator-v9eox |
Beta Was this translation helpful? Give feedback.
@cubecleveland there are a few events that need to be prevented from propagating to the Control component.
Specifically,
onMouseDown
,onTouchEnd
, andonKeyDown
.Here is an example codesandbox that should work for your use-case.
https://codesandbox.io/s/react-select-add-new-indicator-v9eox