react-asc 18.7.2 → 18.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.es.js +17 -0
- package/index.es.js.map +1 -1
- package/index.js +17 -0
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/react-asc.scss +4 -0
package/index.js
CHANGED
|
@@ -282,6 +282,23 @@ const AutoComplete = (props) => {
|
|
|
282
282
|
}
|
|
283
283
|
}, [options]);
|
|
284
284
|
useDebounce(() => { onChange && onChange(searchText); }, debounce, [searchText]);
|
|
285
|
+
React.useEffect(() => {
|
|
286
|
+
if (isShow === true) {
|
|
287
|
+
document.body.classList.add('modal-open');
|
|
288
|
+
const main = document.querySelector('.main');
|
|
289
|
+
main === null || main === void 0 ? void 0 : main.classList.add('modal-open');
|
|
290
|
+
}
|
|
291
|
+
else {
|
|
292
|
+
document.body.classList.remove('modal-open');
|
|
293
|
+
const main = document.querySelector('.main');
|
|
294
|
+
main === null || main === void 0 ? void 0 : main.classList.remove('modal-open');
|
|
295
|
+
}
|
|
296
|
+
}, [isShow]);
|
|
297
|
+
React.useEffect(() => {
|
|
298
|
+
return () => {
|
|
299
|
+
document.body.classList.remove('modal-open');
|
|
300
|
+
};
|
|
301
|
+
}, []);
|
|
285
302
|
const getCssClass = () => {
|
|
286
303
|
const cssClasses = [];
|
|
287
304
|
className && cssClasses.push(className);
|