-
Notifications
You must be signed in to change notification settings - Fork 82
Open
Description
Hello,
I'm utilizing the props portal to show the dropdown in the document.body like the example you have in your examples. However when I add the portal, anywhere I click inside the dropdown closes the dropdown and calls onDropdownClose. e.g if I try to click into the input field or if I try to click on an option while in multi select. At the moment the only way I can keep it open is if I utilize the keepOpen prop. Have any ideas on what could be closing the dropdown right away?
These are the other props I am currently using as well
<Select
className={classNames.join(' ')}
// dropdownPosition={dropdownPosition}
// keepOpen={keepDropdownOpen}
options={data}
values={selectedOptions}
disabled={isDisabled}
dropdownGap={0}
closeOnSelect={false}
multi={isMulti}
backspaceDelete={false}
dropdownRenderer={customDropdownRenderer}
contentRenderer={customContentRenderer}
dropdownHandleRenderer={({ state }) => customDropdownHandleRenderer({ state, isMobile })}
// onDropdownOpen={(e) => {
// onDropdownOpen(e);
// calculateDropdownSize();
// setKeepDropdownOpen(true);
// }}
onDropdownClose={(event) => {
handleDropdownClose(event);
console.log('onDropdownClose: ', event);
}}
handleKeyDownFn={handleKeyDownFn}
portal={typeof document !== `undefined` && document.body}
additionalProps={additionalProps}
/>
Metadata
Metadata
Assignees
Labels
No labels