Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions packages/eui/src/components/tree_view/tree_view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import React, {
import classNames from 'classnames';

import {
withEuiTheme,
WithEuiThemeProps,
withEuiStylesMemoizer,
WithEuiStylesMemoizerProps,
keys,
htmlIdGenerator,
} from '../../services';
Expand Down Expand Up @@ -115,7 +115,7 @@ export type EuiTreeViewProps = Omit<
({ 'aria-label': string } | { 'aria-labelledby': string });

export class EuiTreeViewClass extends Component<
EuiTreeViewProps & WithEuiThemeProps,
WithEuiStylesMemoizerProps & EuiTreeViewProps,
EuiTreeViewState
> {
treeIdGenerator = htmlIdGenerator('euiTreeView');
Expand All @@ -126,7 +126,7 @@ export class EuiTreeViewClass extends Component<
isNested: boolean;

constructor(
props: EuiTreeViewProps & WithEuiThemeProps,
props: WithEuiStylesMemoizerProps & EuiTreeViewProps,
// Without the optional ? typing, TS will throw errors on JSX component errors
// @see https://github.com/facebook/react/issues/13944#issuecomment-1183693239
context?: ContextType<typeof EuiTreeViewContext>
Expand Down Expand Up @@ -276,11 +276,11 @@ export class EuiTreeViewClass extends Component<
display = 'default',
expandByDefault,
showExpansionArrows,
theme,
stylesMemoizer,
...rest
} = this.props;

const styles = euiTreeViewStyles(theme);
const styles = stylesMemoizer(euiTreeViewStyles);
const cssStyles = [styles.euiTreeView, styles[display]];

// Computed classNames
Expand Down Expand Up @@ -375,6 +375,6 @@ export class EuiTreeViewClass extends Component<
* @see {@link https://eui.elastic.co/docs/components/navigation/tree-view/|EuiTreeView documentation}
*/
export const EuiTreeView = Object.assign(
withEuiTheme<EuiTreeViewProps>(EuiTreeViewClass),
withEuiStylesMemoizer<EuiTreeViewProps>(EuiTreeViewClass),
{ Item: EuiTreeViewItem }
);
Loading