Skip to content

Commit

Permalink
add title to initializeT-grid and remove subsequent initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
christineweng committed Nov 28, 2022
1 parent b32c8b9 commit 153a11d
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ const SessionsViewComponent: React.FC<SessionsComponentsProps> = ({
dispatch(
dataTableActions.initializeTGridSettings({
id: tableId,
title: i18n.SESSIONS_TITLE,
defaultColumns: eventsDefaultModel.columns.map((c) =>
!tGridEnabled && c.initialWidth == null
? {
Expand Down Expand Up @@ -146,15 +147,6 @@ const SessionsViewComponent: React.FC<SessionsComponentsProps> = ({
const unit = (c: number) =>
c > 1 ? i18n.TOTAL_COUNT_OF_SESSIONS : i18n.SINGLE_COUNT_OF_SESSIONS;

useEffect(() => {
dispatch(
dataTableActions.initializeTGridSettings({
id: tableId,
title: i18n.SESSIONS_TITLE,
})
);
}, [dispatch, tableId]);

return (
<div data-test-subj={TEST_ID}>
<StatefulEventsViewer
Expand Down

0 comments on commit 153a11d

Please sign in to comment.