@@ -14,7 +14,7 @@ import { default as MenuOutlined } from "@ant-design/icons/MenuOutlined";
1414import { default as Dropdown } from "antd/es/dropdown" ;
1515import { default as Menu , MenuProps } from "antd/es/menu" ;
1616import Segmented from "antd/es/segmented" ;
17- import { Drawer } from "lowcoder-design" ;
17+ import { Drawer , ScrollBar } from "lowcoder-design" ;
1818import { migrateOldData } from "comps/generators/simpleGenerators" ;
1919import { styleControl } from "comps/controls/styleControl" ;
2020import { IconControl } from "comps/controls/iconControl" ;
@@ -195,7 +195,7 @@ const StyledMenu = styled(Menu) <
195195 /* Hover state */
196196 .ant-dropdown-menu-item:hover{
197197 color: ${ ( p ) => p . $hoverColor || p . $activeColor } ;
198- background-color: ${ ( p ) => p . $hoverBg || "transparent" } ;
198+ background-color: ${ ( p ) => p . $hoverBg || "transparent" } !important ;
199199 cursor: pointer;
200200 }
201201 /* Selected/active state */
@@ -565,39 +565,41 @@ const NavCompBase = new UICompBuilder(childrenMap, (props) => {
565565 ) ;
566566 if ( subMenuItems . length > 0 ) {
567567 const subMenu = (
568- < StyledMenu
569- onClick = { ( e ) => {
570- if ( disabled ) return ;
571- const subItem = subItems [ Number ( e . key ) ] ;
572- const isSubDisabled = ! ! subItem ?. children ?. disabled ?. getView ?.( ) ;
573- if ( isSubDisabled ) return ;
574- const onSubEvent = subItem ?. getView ( ) ?. onEvent ;
575- onSubEvent && onSubEvent ( "click" ) ;
576- } }
577- selectedKeys = { subMenuSelectedKeys }
578- items = { subMenuItems . map ( item => ( {
579- ...item ,
580- icon : item . icon || undefined ,
581- } ) ) }
582- $color = { ( props . subNavItemStyle && props . subNavItemStyle . text ) || props . style . text }
583- $hoverColor = { ( props . subNavItemHoverStyle && props . subNavItemHoverStyle . text ) || props . style . accent }
584- $activeColor = { ( props . subNavItemActiveStyle && props . subNavItemActiveStyle . text ) || props . style . accent }
585- $bg = { ( props . subNavItemStyle && props . subNavItemStyle . background ) || undefined }
586- $hoverBg = { ( props . subNavItemHoverStyle && props . subNavItemHoverStyle . background ) || undefined }
587- $activeBg = { ( props . subNavItemActiveStyle && props . subNavItemActiveStyle . background ) || undefined }
588- $border = { ( props . subNavItemStyle && props . subNavItemStyle . border ) || undefined }
589- $hoverBorder = { ( props . subNavItemHoverStyle && props . subNavItemHoverStyle . border ) || undefined }
590- $activeBorder = { ( props . subNavItemActiveStyle && props . subNavItemActiveStyle . border ) || undefined }
591- $radius = { ( props . subNavItemStyle && props . subNavItemStyle . radius ) || undefined }
592- $fontFamily = { props . style . fontFamily }
593- $fontStyle = { props . style . fontStyle }
594- $textWeight = { props . style . textWeight }
595- $textSize = { props . style . textSize }
596- $padding = { ( props . subNavItemStyle && props . subNavItemStyle . padding ) || props . style . padding }
597- $margin = { ( props . subNavItemStyle && props . subNavItemStyle . margin ) || props . style . margin }
598- $textTransform = { props . style . textTransform }
599- $textDecoration = { props . style . textDecoration }
600- />
568+ < ScrollBar style = { { height : "250px" } } >
569+ < StyledMenu
570+ onClick = { ( e ) => {
571+ if ( disabled ) return ;
572+ const subItem = subItems [ Number ( e . key ) ] ;
573+ const isSubDisabled = ! ! subItem ?. children ?. disabled ?. getView ?.( ) ;
574+ if ( isSubDisabled ) return ;
575+ const onSubEvent = subItem ?. getView ( ) ?. onEvent ;
576+ onSubEvent && onSubEvent ( "click" ) ;
577+ } }
578+ selectedKeys = { subMenuSelectedKeys }
579+ items = { subMenuItems . map ( item => ( {
580+ ...item ,
581+ icon : item . icon || undefined ,
582+ } ) ) }
583+ $color = { ( props . subNavItemStyle && props . subNavItemStyle . text ) || props . style . text }
584+ $hoverColor = { ( props . subNavItemHoverStyle && props . subNavItemHoverStyle . text ) || props . style . accent }
585+ $activeColor = { ( props . subNavItemActiveStyle && props . subNavItemActiveStyle . text ) || props . style . accent }
586+ $bg = { ( props . subNavItemStyle && props . subNavItemStyle . background ) || undefined }
587+ $hoverBg = { ( props . subNavItemHoverStyle && props . subNavItemHoverStyle . background ) || undefined }
588+ $activeBg = { ( props . subNavItemActiveStyle && props . subNavItemActiveStyle . background ) || undefined }
589+ $border = { ( props . subNavItemStyle && props . subNavItemStyle . border ) || undefined }
590+ $hoverBorder = { ( props . subNavItemHoverStyle && props . subNavItemHoverStyle . border ) || undefined }
591+ $activeBorder = { ( props . subNavItemActiveStyle && props . subNavItemActiveStyle . border ) || undefined }
592+ $radius = { ( props . subNavItemStyle && props . subNavItemStyle . radius ) || undefined }
593+ $fontFamily = { props . style . fontFamily }
594+ $fontStyle = { props . style . fontStyle }
595+ $textWeight = { props . style . textWeight }
596+ $textSize = { props . style . textSize }
597+ $padding = { ( props . subNavItemStyle && props . subNavItemStyle . padding ) || props . style . padding }
598+ $margin = { ( props . subNavItemStyle && props . subNavItemStyle . margin ) || props . style . margin }
599+ $textTransform = { props . style . textTransform }
600+ $textDecoration = { props . style . textDecoration }
601+ />
602+ </ ScrollBar >
601603 ) ;
602604 return (
603605 < Dropdown
0 commit comments