@@ -43377,7 +43413,7 @@ exports[`ConfigProvider components TreeSelect prefixCls 1`] = `
>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Bamboo
-
-
-
- parent 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-`;
-
exports[`TreeSelect TreeSelect Custom Icons should support customized icons 1`] = `
{
it('should `treeIcon` work', () => {
const { container } = render(
- Bamboo} />
+ } />
,
);
- expect(container.firstChild).toMatchSnapshot();
+ expect(container.querySelector('.ant-select-tree-treenode .bamboo')).toBeTruthy();
});
});
diff --git a/components/tree-select/index.tsx b/components/tree-select/index.tsx
index 0cc70df8f2..833f33d1fd 100644
--- a/components/tree-select/index.tsx
+++ b/components/tree-select/index.tsx
@@ -31,6 +31,7 @@ import { useCompactItemContext } from '../space/Compact';
import type { AntTreeNodeProps, TreeProps } from '../tree';
import type { SwitcherIcon } from '../tree/Tree';
import SwitcherIconCom from '../tree/utils/iconUtil';
+import { useToken } from '../theme/internal';
import useStyle from './style';
type RawValue = string | number;
@@ -97,7 +98,7 @@ const InternalTreeSelect =