0.2.4 • Published 4 years ago

kuv-table v0.2.4

Weekly downloads
30
License
-
Repository
-
Last release
4 years ago

KuvTable

This library was generated with Angular CLI version 8.2.14.

Code scaffolding

Run ng generate component component-name --project kuv-table to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module --project kuv-table.

Note: Don't forget to add --project kuv-table or else it will be added to the default project in your angular.json file.

Inputs

The table inputs in order to use the table are:

InputTypeDefaultDescription
tableOptionsOptionsnullAllows the customization of the table style.
headOptionsOptionsnullAllows the customization of the header style.
footOptionsOptionsnullAllows the customization of the footer style.
showIndexbooleantrueIndicates if the index column is shown or not.
searchbooleantrueIndicates if the search header is shown or not.
sortbooleantrueIndicates if the columns are sortable or not.
dataModelArray\[]The array of data to show.
columnsArray<string|[Column](#column)>[]The columns to show on the table.
actionsArray\<Action>nullThe actions that the table shows for default.

Usage

Documentation

Options

ParamTypeDescription
classstringList of classes.
asideboolean(footOptionsOnly) Indicates if the footer is outside the table or not

Action

ParamTypeDescription
iconanyIcon of the action button. optional
labelstringLabel of the action button. optional
clickActionFunction(element, index)Function excecuted on click.
showboolean | Function(element, index): booleanValue that indicates if the action is shown or not. optional

Column

ParamTypeDescription
attributestringName of the column to show. optional
labelstring | Function(element, index): stringLabel of the column in the header. optional
valuestring | Function(element, index): stringText to show in the column. optional
filterstring | FilterFilter type to show. optional

Filter

ParamTypeDescription
type'text' | 'number' | 'select'Type of the filter input of the column.
value'value'| 'attribute'The value that should be filtered.
optionsstring[] | OptionList of options to show in the select type.

Option

ParamTypeDescription
labelstringLabel to show in the select.
valuestringValue of the option in the select.

Change Log

Version 0.2.4

  • Fixed sort on dates and weird number formats

Version 0.2.3

  • Fixed index send to click events.

Version 0.2.2

  • Minor changes.

Version 0.2.1

  • Filter fixed.

Version 0.2.0

  • Pagination can now be disabled and load every item.
  • Filter and Sort can be applied to the value of the column, not the attribute.

Version 0.1.1

  • Minor Fixes

Version 0.1.0

  • Added Option type to Filters
  • Added value param to Filters.
  • Added showIndex Input to the component.
  • Fixed Readme links.

Version 0.0.3

  • Added onChange event for reloading dataModel

Version 0.0.2

  • Added readme

Version 0.0.1

  • Initial Version.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI README.

0.2.4

4 years ago

0.2.3

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.2.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago