@codeleap/web 3.12.15 → 3.12.17

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.15",
3
+ "version": "3.12.17",
4
4
  "main": "src/index.ts",
5
5
  "repository": {
6
6
  "url": "https://github.com/codeleap-uk/internal-libs-monorepo.git",
@@ -335,9 +335,11 @@ export const Modal = (props) => {
335
335
  if (visible) {
336
336
  document.body.style.overflowY = 'hidden'
337
337
  document.body.style.overflowX = 'hidden'
338
+ document.body.style.maxHeight = '100svh'
338
339
  } else {
339
340
  document.body.style.overflowY = 'visible'
340
341
  document.body.style.overflowX = 'hidden'
342
+ document.body.style.maxHeight = 'unset'
341
343
  }
342
344
  }, [visible])
343
345
 
@@ -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}