2.4.3 • Published 2 months ago

@egeatech/vue2-datatable-component v2.4.3

Weekly downloads
15
License
MIT
Repository
github
Last release
2 months ago

@egeatech/vue2-datatable-component

This is a fork of Datatable for Vue.js 2.x of Ken Berkeley npm i @egeatech/vue2-datatable-component

Original repository | Original documentation

Parameters (*) => new on this fork:

ProDescTypeOptional valuesDefault valueRequired
columnsDefination of columnsArray--Y
dataData of the current page (rows)Array--Y
totalTotal number of the recordsNumber--Y
queryQuery objectObject--Y
selectionContainer for multi-selectArray--N
summarySummary rowObject--N
xpropsCarrier for extra props passed to dynamic componentsObject--N
HeaderSettingsWhether to render HeaderSettingsBooleantrue / falsefalseN
PaginationWhether to render pagination relevantBooleantrue / falsetrueN
pageSizeOptionsoptions for PageSizeSelectArray-10, 20, 40, 80, 100N
tbl-classClasses for \String / Object / Array--N
tbl-styleInline styles for \String / Object / Array--N
fixHeaderAndSetBodyMaxHeight(Just as its name implies)Number--N
support-backupWhether to enable backup of HeaderSettingsBooleantrue / falsefalseN
support-nestedWhether to enable nested components feature (accordion mode is available)Boolean / Stringtrue / false / 'accordion'falseN
(*) loadingDisplay loading slot in table bodyBoolean-falseN
(*) enableClickableRowsEnable the on-row-click eventBoolean-trueN
(*) enableSearchRowAdd a row for filtering the resultsBoolean-falseN
(*) searchDebounceThe amount of time (in milliseconds) before debounced search will be triggeredNumber-500Y

Column Options (*) => new on this fork:

AttrDescTypeOptional valuesDefault valueRequired
titleDisplayed titleString--N
labelLabel in HeaderSettings (title will take its place if not set)String--N
fieldField name of the rowString--N
explainExplanation of the field (tooltip)String--N
sortableIs sortableBooleantrue / falsefalseN
visibleIs visibleBoolean / String (if the type is String, the visibility is not allowed to toggle)true / false / 'true' / 'false'trueN
fixedIs fixedBoolean / Stringtrue / false / 'left' / 'right'-N
groupGroup nameString--N
colClassClasses for the whole columnString / Object--N
colStyleInline styles for the whole columnObject--N
thClassClasses for \String--N
thStyleInline styles for \Object--N
thCompdynamic component for \String / Object--N
tdClassClasses for \String--N
tdStyleInline styles for \Object--N
tdCompdynamic component for \String / Object--N
(*) fireRowClickfire the on-row-click event if the cell is clickedBoolean-trueN
(*) searchableenable the filtering input (enableSearchRow has to be set true)Boolean-falseN
(*) searchFieldfire the search and order queries with another string as fieldString--N
(*) searchOptionsuse a dropdown as search mode with a set of values {label: '' value: ''}, the label will be displayed, the value will be used for the searchArray--N

New component slots:

  • spinner slot: used to insert your own custom spinner (to use with the loading parameter above)

    <template v-slot:spinner> Loading... </template>

  • scoped-slots named as the table fields: you can access the cell/row information and override the cell content

    • data: for the cell field
    • row: for the row object

      <template v-slot:surname="col"><span style="color: darkred"><i>{{ col.data }}</i></span></template>

Other personalization:

  • fields can be written as object paths (like 'user.house.address')
  • small style and translation adjustments
  • on-row-click event (bound to cells, cells can be excluded using fireRowClick option)
2.4.1

2 months ago

2.4.0

2 months ago

2.4.3

2 months ago

2.4.2

2 months ago

2.3.15

4 years ago

2.3.14

4 years ago

2.3.13

4 years ago

2.3.12

4 years ago

2.3.11

4 years ago

2.3.10

4 years ago

2.3.9

4 years ago

2.3.8

4 years ago

2.3.7

4 years ago

2.3.6

4 years ago

2.3.5

4 years ago

2.3.4

4 years ago

2.3.3

4 years ago

2.3.2

4 years ago

2.3.1

4 years ago