From 66223462863fbad4c9d4da327bc161129ed246ee Mon Sep 17 00:00:00 2001 From: Mateusz Kwasniewski Date: Wed, 2 Nov 2022 12:55:20 +0100 Subject: [PATCH] Add stable row id. (#2315) Co-authored-by: Tymoteusz Czech <2625371+Tymek@users.noreply.github.com> --- .../Project/ProjectFeatureToggles/ProjectFeatureToggles.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontend/src/component/project/Project/ProjectFeatureToggles/ProjectFeatureToggles.tsx b/frontend/src/component/project/Project/ProjectFeatureToggles/ProjectFeatureToggles.tsx index ae6676abd0..4a47964ea3 100644 --- a/frontend/src/component/project/Project/ProjectFeatureToggles/ProjectFeatureToggles.tsx +++ b/frontend/src/component/project/Project/ProjectFeatureToggles/ProjectFeatureToggles.tsx @@ -344,6 +344,10 @@ export const ProjectFeatureToggles = ({ [environments] // eslint-disable-line react-hooks/exhaustive-deps ); + const getRowId = useCallback((row: any) => { + return row.name; + }, []); + const { allColumns, headerGroups, @@ -359,6 +363,7 @@ export const ProjectFeatureToggles = ({ sortTypes, disableSortRemove: true, autoResetSortBy: false, + getRowId, }, useFlexLayout, useSortBy