1.0.23 • Published 4 years ago

@venoid/admin-table v1.0.23

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

Venoid Admin Table Component

npm npm bundle size (scoped)

Table component for your administration provides you good options how to load and render your data in a simple table.

screenshot-example

New features

  • Sortable columns
  • Backend sorting. Sort data by yourself on backend.

Props

PropsTypeDefault
table-columnsArrayundefinedArray of objects with options
table-dataArrayundefinedArray with your data
is-loadingBooleanfalseWhen true, loading animation appears
paginatedBooleanfalseWhen true, pagination appears
is-simple-paginationBooleanfalseWhen true, simple pagination appears - just arrows and current bulk
default-sortArray[]Has two elements - field and sort type
total-data-countNumbernullTotal count of your data (if paginated is true)
current-pageNumber1Number of the current page (if paginated is true)
per-page-optionsArray{value: '5', label: 5}, {value: '10', label: 10}, {value: '15', label: 15}, {value: '20', label: 20}Define your own select box with per page options (if paginated is true)
backend-sortingBooleanfalseIf true handle sorting on yourself see sort event
error-messageStringnullMessage which displays when there are no data in a table

table-column options

{
  type: 'string' // Enum['id', 'number', 'string ],
  label: 'Name'  // String,
  fieldName: 'name' // name of the property you want to render - needed if using sortable!
  field: (row) => row.name //Render function for data,
  width: '60' // String,
  sortable: true // the column will be sortable
}

Events

EventspayloadDescription
pagination-changeobject with currentPage and perPageTriggers when something in paginator changes.
sortobject with field and orderTriggers when clicked on sortable column

Demo

To see demo run a project:

  1. Install npm dependencies
  2. Run with npm run serve / yarn serve
1.0.22

4 years ago

1.0.23

4 years ago

1.0.21

4 years ago

1.0.20

4 years ago

1.0.19

4 years ago

1.0.18

4 years ago

1.0.17

4 years ago

1.0.16

4 years ago

1.0.15

4 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago