From 9d97d61ef3b165a8468a7455738ccafcd0ccb93b Mon Sep 17 00:00:00 2001 From: sunhao Date: Fri, 16 Aug 2024 16:34:43 +0800 Subject: [PATCH] * menu: add headerClass and footerClass to searchMenu. --- lib/menu/src/component/search-menu.tsx | 8 ++++---- lib/menu/src/types/search-menu-options.ts | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/menu/src/component/search-menu.tsx b/lib/menu/src/component/search-menu.tsx index c114c2d57b..80a1473df7 100644 --- a/lib/menu/src/component/search-menu.tsx +++ b/lib/menu/src/component/search-menu.tsx @@ -157,14 +157,14 @@ export class SearchMenu extends protected _renderWrapperHeader(props: RenderableProps): ComponentChildren { const hasHeader = props.header; - const {noMatchHint, searchBox, searchPlacement, nestedSearch} = props; + const {noMatchHint, searchBox, searchPlacement, nestedSearch, headerClass} = props; const hasTopSearchBox = (!nestedSearch || this.isRoot) && searchBox && searchPlacement !== 'bottom'; if (!hasHeader && !hasTopSearchBox && !noMatchHint) { return null; } return [ noMatchHint ?
{noMatchHint}
: null, - (hasHeader || hasTopSearchBox) ? (
+ (hasHeader || hasTopSearchBox) ? (
{hasHeader ? super._renderWrapperHeader(props) : null} {hasTopSearchBox ? this._renderSearchBox(props) : null}
) : null, @@ -173,13 +173,13 @@ export class SearchMenu extends protected _renderWrapperFooter(props: RenderableProps): ComponentChildren { const hasFooter = props.footer; - const {searchBox, searchPlacement, nestedSearch} = props; + const {searchBox, searchPlacement, nestedSearch, footerClass} = props; const hasBottomSearchBox = (!nestedSearch || this.isRoot) && searchBox && searchPlacement === 'bottom'; if (!hasFooter && !hasBottomSearchBox) { return null; } return ( -