Skip to content

Commit 6348fa5

Browse files
authored
Merge pull request #1249 from ZeroTo0ne/fix-component-tabs
fix(tabs): change tab key to fix possible problems when using tab title as a key
2 parents fb5254d + 777b30d commit 6348fa5

File tree

1 file changed

+1
-1
lines changed
  • packages/taro-ui/src/components/tabs

1 file changed

+1
-1
lines changed

packages/taro-ui/src/components/tabs/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ export default class AtTabs extends React.Component<AtTabsProps, AtTabsState> {
186186
<View
187187
className={itemCls}
188188
id={`tab${this._tabId}${idx}`}
189-
key={item.title}
189+
key={`at-tabs-item-${idx}`}
190190
onClick={this.handleClick.bind(this, idx)}
191191
>
192192
{item.title}

0 commit comments

Comments
 (0)