@codeleap/web 3.12.14 → 3.12.16

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codeleap/web",
3
- "version": "3.12.14",
3
+ "version": "3.12.16",
4
4
  "main": "src/index.ts",
5
5
  "repository": {
6
6
  "url": "https://github.com/codeleap-uk/internal-libs-monorepo.git",
@@ -333,10 +333,10 @@ export const Modal = (props) => {
333
333
  }
334
334
 
335
335
  if (visible) {
336
- document.body.style.overflow = 'hidden'
336
+ document.body.style.overflowY = 'hidden'
337
337
  document.body.style.overflowX = 'hidden'
338
338
  } else {
339
- document.body.style.overflow = 'visible'
339
+ document.body.style.overflowY = 'visible'
340
340
  document.body.style.overflowX = 'hidden'
341
341
  }
342
342
  }, [visible])
@@ -375,6 +375,14 @@ export const Select = forwardRef<HTMLInputElement, SelectProps>(
375
375
  setKeyDownActive(true)
376
376
  }
377
377
 
378
+ const MenuComponent = React.useCallback((props) => {
379
+ return <CustomMenu {...props} Footer={FooterComponent} />
380
+ }, [])
381
+
382
+ const MenuListComponent = React.useCallback((props) => {
383
+ return <CustomMenuList {...props} defaultStyles={menuWrapperStyles} />
384
+ }, [])
385
+
378
386
  return (
379
387
  <InputBase
380
388
  {...inputBaseProps}
@@ -434,8 +442,8 @@ export const Select = forwardRef<HTMLInputElement, SelectProps>(
434
442
  ),
435
443
  DropdownIndicator: props => showDropdownIcon ? <components.DropdownIndicator {...props} /> : null,
436
444
  NoOptionsMessage: props => <_Placeholder {...props} />,
437
- Menu: props => <CustomMenu {...props} Footer={FooterComponent} />,
438
- MenuList: props => <CustomMenuList {...props} defaultStyles={menuWrapperStyles} />,
445
+ Menu: MenuComponent,
446
+ MenuList: MenuListComponent,
439
447
  Option: props => (
440
448
  <DefaultOption
441
449
  {...props}