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 CHANGED
@@ -274,6 +274,23 @@ const AutoComplete = (props) => {
274
274
  }
275
275
  }, [options]);
276
276
  useDebounce(() => { onChange && onChange(searchText); }, debounce, [searchText]);
277
+ useEffect(() => {
278
+ if (isShow === true) {
279
+ document.body.classList.add('modal-open');
280
+ const main = document.querySelector('.main');
281
+ main === null || main === void 0 ? void 0 : main.classList.add('modal-open');
282
+ }
283
+ else {
284
+ document.body.classList.remove('modal-open');
285
+ const main = document.querySelector('.main');
286
+ main === null || main === void 0 ? void 0 : main.classList.remove('modal-open');
287
+ }
288
+ }, [isShow]);
289
+ useEffect(() => {
290
+ return () => {
291
+ document.body.classList.remove('modal-open');
292
+ };
293
+ }, []);
277
294
  const getCssClass = () => {
278
295
  const cssClasses = [];
279
296
  className && cssClasses.push(className);