Plugins: Fixed issue with toolbar button key not being unique

pull/4127/head
Laurent Cozic 2020-11-20 16:19:57 +00:00
parent e0c2b62a6c
commit ee912b24c7
2 changed files with 3 additions and 2 deletions

View File

@ -41,14 +41,14 @@ export default function styles(props: Props) {
leftIcon: {
fontSize: iconSize,
position: 'relative',
top: 2,
top: 1,
color: theme.color3,
},
rightIcon: {
fontSize: iconSize - 1,
borderLeft: 'none',
position: 'relative',
top: 2,
top: 1,
color: theme.color3,
},
};

View File

@ -40,6 +40,7 @@ class ToolbarBaseComponent extends React.Component<Props, any> {
const o = this.props.items[i];
let key = o.iconName ? o.iconName : '';
key += o.title ? o.title : '';
key += o.name ? o.name : '';
const itemType = !('type' in o) ? 'button' : o.type;
if (!key) key = `${o.type}_${i}`;