1.2.6 • Published 6 years ago

ui-package--table-component-react v1.2.6

Weekly downloads
5
License
MIT
Repository
-
Last release
6 years ago

Introduction:

This package implements models.

DefaultTable

Example:

import DefaultTable from 'ui-package--table-component-react'
import 'ui-package--table-component-react/src/Styles/SortComponent.scss'
import 'ui-package--table-component-react/src/Styles/TableComponent.scss'

const data = [
    {name: 'Alex', phone: '98234798234'},
    {name: 'Jimmy', phone: '09856745'},
    {name: 'Albert', phone: '02138366322132'},
    {name: 'Jone', phone: '76235464'},
    {name: 'Paul', phone: '627363'}
]

const builder = new TableBuilder()
const createColumnHeadFunc = () => (
  builder
    .getFactory()
    .addHeader('name')
    .addHeader('phone')
    .getHeaders()
)
const createColumnBodyFunc = () => (
  builder
    .getFactory()
    .addBody('name', entity.name)
    .addBody('phone', entity.phone)
    .getBodies()
)
builder.buildColumnManager(
  createColumnHeadFunc,
  createColumnBodyFunc
)
const table = builder.getTableFacade()
<DefaultTable
  entities={data}
  onSelectEntity={() => {}}
  table={table} />

Props:

NameTypeDefaultDescription
tableTableFacadeAbstractnullYou can get its via TableBuilder
entitiesArray[]You need input your data
createHeadColumnsFunctionnullShould return array of ColumnHeadEntityInterface
createBodyColumnsFunction<Object>nullShould return array of ColumnBodyEntityInterface
onSelectEntityFunction<Object[], TableFacadeAbstract>
onSortFunction<String, TableFacadeAbstract>
onDoubleClickFunction<Event, Object, TableFacadeAbstract>
onClickFunction<Event, Object, TableFacadeAbstract>
onContextMenuFunction<Event, Object, TableFacadeAbstract>
comparisonFunction<Object, Object>(e, e2) => e === e2
classNameString
loadedBooleanIt need you if you use async
themeStringtable-component__theme_default
1.2.6

6 years ago

1.2.5

6 years ago

1.2.4

6 years ago

1.2.3

6 years ago

1.2.2

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.0

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago