Skip to content

Commit

Permalink
revert doc example
Browse files Browse the repository at this point in the history
  • Loading branch information
AlekseyManetov committed Dec 12, 2024
1 parent 07c20f4 commit 924a1f0
Showing 1 changed file with 9 additions and 26 deletions.
35 changes: 9 additions & 26 deletions app/src/docs/_examples/tables/LazyTable.example.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
import React, { ReactNode, useCallback, useMemo, useState } from 'react';
import { DataSourceState, DataColumnProps, useUuiContext, useLazyDataSource, DropdownBodyProps } from '@epam/uui-core';
import {
Dropdown,
DropdownMenuButton,
DropdownMenuSplitter,
DropdownMenuBody,
Text,
DataTable,
Panel,
IconButton,
DataTableCell, TextInput,
} from '@epam/uui';
import { Dropdown, DropdownMenuButton, DropdownMenuSplitter, DropdownMenuBody, Text, DataTable, Panel, IconButton } from '@epam/uui';
import { City } from '@epam/uui-docs';
import { ReactComponent as MoreIcon } from '@epam/assets/icons/common/navigation-more_vert-18.svg';
import { ReactComponent as PencilIcon } from '@epam/assets/icons/common/content-edit-18.svg';
Expand Down Expand Up @@ -49,29 +39,23 @@ export default function CitiesTable() {
{
key: 'name',
caption: 'Name',
renderCell: (props) => (
<DataTableCell
{ ...props.rowLens.prop('name').toProps() }
renderEditor={ (props) => <TextInput { ...props } /> }
{ ...props }
/>
render: (city) => (
<Text color="primary" fontSize="14">
{city.name}
</Text>
),
canCopy: () => true,
isSortable: true,
width: 162,
grow: 1,
},
{
key: 'countryName',
caption: 'Country',
renderCell: (props) => (
<DataTableCell
{ ...props.rowLens.prop('countryName').toProps() }
renderEditor={ (props) => <TextInput { ...props } /> }
{ ...props }
/>
render: (city) => (
<Text color="primary" fontSize="14">
{city.countryName}
</Text>
),
canAcceptCopy: () => true,
isSortable: true,
width: 128,
isFilterActive: (filter) => filter.country && filter.country.$in && !!filter.country.$in.length,
Expand Down Expand Up @@ -139,7 +123,6 @@ export default function CitiesTable() {
// Spread ListProps and provide getRows function from view to DataTable component.
// getRows function will be called every time when table will need more rows.
{ ...view.getListProps() }
onCopy={ () => {} }
getRows={ view.getVisibleRows }
showColumnsConfig={ false }
headerTextCase="upper"
Expand Down

0 comments on commit 924a1f0

Please sign in to comment.