This is an automated email from the ASF dual-hosted git repository. lyndsi pushed a commit to branch fix-frontend-key-errors in repository https://gitbox.apache.org/repos/asf/superset.git
commit 8fa4354b6426be40a65acedfea7aa1cf34084096 Author: michael_hoffman <[email protected]> AuthorDate: Sun Mar 20 10:49:40 2022 +0200 fix(frontend react key warnings): update key of SubMenu --- superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx | 1 + superset-frontend/src/views/components/Menu.tsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx index e7e0447e61..b334eab164 100644 --- a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx +++ b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx @@ -950,6 +950,7 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({ ?.filter((db: DatabaseForm) => db.preferred) .map((database: DatabaseForm) => ( <IconButton + key={database.name} className="preferred-item" onClick={() => setDatabaseModel(database.name)} buttonText={database.name} diff --git a/superset-frontend/src/views/components/Menu.tsx b/superset-frontend/src/views/components/Menu.tsx index 9b50710999..09fbcd867f 100644 --- a/superset-frontend/src/views/components/Menu.tsx +++ b/superset-frontend/src/views/components/Menu.tsx @@ -213,7 +213,7 @@ export function Menu({ } return ( <SubMenu - key={index} + key={`${index} - ${label}`} title={label} icon={showMenu === 'inline' ? <></> : <Icons.TriangleDown />} >
