From b6ddde26d243891bb5c175393b7f9c433a8606fe Mon Sep 17 00:00:00 2001 From: AlekseyManetov Date: Thu, 7 Nov 2024 12:57:26 +0100 Subject: [PATCH] [Docs]: remove autofocus of the last row of editable table example --- app/src/docs/_examples/tables/EditableTable.example.tsx | 6 +----- app/src/docs/_examples/tables/TablesExamples.module.scss | 3 ++- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/app/src/docs/_examples/tables/EditableTable.example.tsx b/app/src/docs/_examples/tables/EditableTable.example.tsx index eccd7f93e0..ac456a1909 100644 --- a/app/src/docs/_examples/tables/EditableTable.example.tsx +++ b/app/src/docs/_examples/tables/EditableTable.example.tsx @@ -1,4 +1,4 @@ -import React, { useCallback, useEffect, useMemo, useState } from 'react'; +import React, { useCallback, useMemo, useState } from 'react'; import { DataColumnProps, DataSourceState, DataTableRowProps, IImmutableMap, ItemsMap, Metadata, PatchOrdering, useArrayDataSource } from '@epam/uui-core'; import { Button, Checkbox, FlexSpacer, DataTable, DataTableCell, DataTableRow, DatePicker, FlexCell, FlexRow, Panel, PickerInput, TextArea, TextInput, useForm, IconButton } from '@epam/uui'; @@ -117,10 +117,6 @@ export default function EditableTableExample() { }); }, [setTableState]); - useEffect(() => { - dataTableFocusManager?.focusRow(lastId - 1); - }, [dataTableFocusManager]); - // Define DataSource to use in PickerInput in the 'tags' column const pickerDataSource = useArrayDataSource({ items: tags }, []); diff --git a/app/src/docs/_examples/tables/TablesExamples.module.scss b/app/src/docs/_examples/tables/TablesExamples.module.scss index ccfebd6b97..9199b75ea1 100644 --- a/app/src/docs/_examples/tables/TablesExamples.module.scss +++ b/app/src/docs/_examples/tables/TablesExamples.module.scss @@ -1,7 +1,8 @@ @import '~@epam/promo/assets/styles/colors'; .container { - height: 400px; + min-height: 454px; + max-height: 620px; display: flex; flex: 1 1 0; flex-direction: column;