# oe-data-table

> A template element , used to create oe-ui Polymer 3 elements

Latest version **2.3.0** (published 2020-10-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install oe-data-table
pnpm add oe-data-table
yarn add oe-data-table
bun add oe-data-table
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.3.0 |
| Published | 2020-10-07 |
| First published | 2019-03-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 21 |
| Unpacked size | 913.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | vamsee147 |

## Links

- npm: https://www.npmjs.com/package/oe-data-table
- Repository: https://github.com/EdgeVerve/oe-data-table
- Homepage: https://github.com/EdgeVerve/oe-data-table#readme
- Issues: https://github.com/EdgeVerve/oe-data-table/issues
- npm.io page: https://npm.io/package/oe-data-table

## Dependencies (21)

- [oe-ajax](https://npm.io/package/oe-ajax.md) ^2.0.0
- [oe-info](https://npm.io/package/oe-info.md) ^2.0.0
- [oe-combo](https://npm.io/package/oe-combo.md) ^2.0.0
- [oe-input](https://npm.io/package/oe-input.md) ^2.0.0
- [oe-utils](https://npm.io/package/oe-utils.md) ^2.0.0
- [oe-mixins](https://npm.io/package/oe-mixins.md) ^2.0.0
- [sortablejs](https://npm.io/package/sortablejs.md) 1.8.3
- [oe-i18n-msg](https://npm.io/package/oe-i18n-msg.md) ^2.0.0
- [oe-ui-forms](https://npm.io/package/oe-ui-forms.md) ^2.0.0
- [@polymer/polymer](https://npm.io/package/@polymer/polymer.md) ^3.1.0
- [@polymer/iron-list](https://npm.io/package/@polymer/iron-list.md) ^3.0.1
- [@polymer/paper-toast](https://npm.io/package/@polymer/paper-toast.md) ^3.0.1
- [@polymer/paper-dialog](https://npm.io/package/@polymer/paper-dialog.md) ^3.0.1
- [@polymer/iron-collapse](https://npm.io/package/@polymer/iron-collapse.md) ^3.0.1
- [@polymer/paper-listbox](https://npm.io/package/@polymer/paper-listbox.md) ^3.0.1
- [@polymer/paper-tooltip](https://npm.io/package/@polymer/paper-tooltip.md) ^3.0.1
- [@polymer/paper-checkbox](https://npm.io/package/@polymer/paper-checkbox.md) ^3.1.0
- [@polymer/paper-progress](https://npm.io/package/@polymer/paper-progress.md) ^3.0.1
- [@polymer/paper-menu-button](https://npm.io/package/@polymer/paper-menu-button.md) ^3.0.1
- [@polymer/paper-dropdown-menu](https://npm.io/package/@polymer/paper-dropdown-menu.md) ^3.0.1
- [@polymer/paper-dialog-scrollable](https://npm.io/package/@polymer/paper-dialog-scrollable.md) ^3.0.1

## Recent versions

- 2.3.0 (latest) — 2020-10-07
- 2.2.0 — 2020-05-04
- 2.1.0 — 2020-01-02
- 2.0.0 — 2019-03-13

## README

# \<oe-data-table\>

`<oe-data-table>` is a component for displaying data in tabular format. It is a Polymer component styled with Material Design Data Table Standards.
  It can be used to add, edit and delete data in a model which has a `embedded`/`hasMany` relation.
  Also to display the entries in a model

  The data to be shown is set to `items` and columns to show is set to `columns`.

Property | Description
----------------|-------------
`showAccordian` | To display accordian view in each row
`accordianElement` | Component name to be displayed in accordian expanded view
`disableConfigEditor` | If set to true, config editor would be disabled
`maxHeaderHeight` | Set height of the header (in px)
`showEditOptions` | To display edit options in header toolbar

### Defining Columns

The column(s) to show in the table can be configured using the `columns` property.
The `columns` property takes an array of objects which can have the following properties.

Column property | Description
----------------|-------------
`key` | The key of the row to get data from.
`label` | The string to be shown in column header.
`type` | The type of the content that is shown in the column. For example date, timestamp, number, string.
`uitype` | (Deprecated. use type) The type of the content that is shown in the column. For example date, timestamp.
`uiType` | The input control that has to be used for inline editing.
`readOnly` | Boolean flag denoting whether the column is non editable in inline mode , by default it is false.
`width` | Width of the column in `px`.
`minWidth` | Min Width of the column in `px`, by default grid level min width will be taken.
`alignment` | Alignment of the cell content , can have `left`,`right` or `center` .
`sort` |  Sort order of the current column. Takes either `asc` or `desc`.
`firstToSort` | Whether to sort first by desc or asc, by default it is asc.
`formatter` | A custom formatting function which returns the value to show in the cell.
`renderer` | A custom rendering function which returns the element to show in the cell.
`href` | Takes an express styled path and shows the cell content as a `hyperlink` with the provided path. For example, href="/models/customer/:id".
`cellClass` | Class to apply on data table cell
`cellClassRules` | Object having class name to be applied as key and an expression to evaluate as value
`valueGetter` | A custom getter function which returns a value for the property specified in the `key`.
`hidden` | Column will be hidden if it is set to true.
`autoFit` | table height should be set by user when this property is true.


### Styling

`<oe-data-table>` provides the following custom properties and mixins for styling:

Custom property | Description | Default
----------------|-------------|----------
`--oe-data-table` | Mixin to be applied to whole table | {}
`--oe-data-table-header` | Mixin to be applied to the table header  | {}
`--oe-data-table-header-title` | Mixin to be applied to the table header title  | {}
`--oe-data-table-row` | Mixin to be applied to the table row | {}
`--oe-data-table-row-selected` | Mixiin to be applied to the table row when selected | {}
`--oe-data-table-row-hover` | Mixin to be applied to the table row on hover | {}
`--oe-data-table-row-first` | Mixin to be applied to the first row of the table | {}
`--oe-data-table-row-last` | Mixin to be applied to the last row of the table | {}
`--oe-data-table-data` | Mixin to be applied to the table cell | {}
`--oe-data-table-column-first` | Mixin to be applied to the first column | {}
`--oe-data-table-column-last` | Mixin to be applied to the last column | {}
`--oe-data-table-selection-cell-content` | Mixiin to be applied to the selection cell content if provided | {}
`--oe-data-table-row-action` | Mixin applied to the row action icon buttons | {}
`--oe-data-table-data` | Mixin to be applied to table-data class to set min-height | {}
`--oe-data-table-selection-checkbox` | Mixin to be applied to table selection checkbox | {}
`--edit-control` | Mixin applied to set the height of edit cell | {}

---
_Source: https://npm.io/package/oe-data-table · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
