MCPcopy
hub / github.com/react-bootstrap/react-bootstrap / isClosingPermitted

Function isClosingPermitted

src/Dropdown.tsx:138–149  ·  view source on GitHub ↗
(source: string)

Source from the content-addressed store, hash-verified

136 const isRTL = useIsRTL();
137
138 const isClosingPermitted = (source: string): boolean => {
139 // autoClose=false only permits close on button click
140 if (autoClose === false) return source === 'click';
141
142 // autoClose=inside doesn't permit close on rootClose
143 if (autoClose === 'inside') return source !== 'rootClose';
144
145 // autoClose=outside doesn't permit close on select
146 if (autoClose === 'outside') return source !== 'select';
147
148 return true;
149 };
150
151 const handleToggle = useEventCallback(
152 (nextShow: boolean, meta: ToggleMetadata) => {

Callers 1

Dropdown.tsxFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…