From 18550e069f3a2311e93370ae4aaa15d7ff849fe5 Mon Sep 17 00:00:00 2001 From: MadCcc <1075746765@qq.com> Date: Thu, 9 Mar 2023 14:55:44 +0800 Subject: [PATCH] fix: quote in key should not cause tabs crash (#655) --- src/TabNavList/TabNode.tsx | 3 ++- src/TabNavList/index.tsx | 4 ++-- src/util.ts | 5 +++++ tests/index.test.tsx | 4 ++++ 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/TabNavList/TabNode.tsx b/src/TabNavList/TabNode.tsx index 932b32a1..00e4aa02 100644 --- a/src/TabNavList/TabNode.tsx +++ b/src/TabNavList/TabNode.tsx @@ -2,6 +2,7 @@ import classNames from 'classnames'; import KeyCode from 'rc-util/lib/KeyCode'; import * as React from 'react'; import type { EditableConfig, Tab } from '../interface'; +import { genDataNodeKey } from '../util'; export interface TabNodeProps { id: string; @@ -56,7 +57,7 @@ function TabNode({