Skip to content

Commit

Permalink
* tree: fix default inner component type not work in search tree.
Browse files Browse the repository at this point in the history
  • Loading branch information
catouse committed Aug 30, 2024
1 parent 724feba commit cd3b5a3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/tree/src/components/search-tree.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {SearchMenu} from '@zui/menu/src/component';
import {Listitem} from '@zui/list/src/component';
import {Tree} from './tree';

import type {RenderableProps} from 'preact';
import type {ClassNameLike} from '@zui/core';
import type {Item} from '@zui/common-list';
import type {NestedItem} from '@zui/list';
import type {SearchTreeOptions} from '../types';

Expand All @@ -12,9 +12,9 @@ export class SearchTree<T extends SearchTreeOptions = SearchTreeOptions> extends

static inheritNestedProps = [...SearchMenu.inheritNestedProps, 'itemActions', 'expandedIcon', 'collapsedIcon', 'normalIcon'];

static defaultItemProps: Partial<Item> = {
...SearchMenu.defaultProps,
innerComponent: 'div',
static ItemComponents: typeof SearchMenu.ItemComponents = {
...SearchMenu.ItemComponents,
item: [Listitem, {innerComponent: 'div'}],
};

protected _getClassName(props: RenderableProps<T>): ClassNameLike {
Expand Down

0 comments on commit cd3b5a3

Please sign in to comment.