custom-cards / flex-table-card

Highly Flexible Lovelace Card - arbitrary contents/columns/rows, regex matched, perfect to show appdaemon created content and anything breaking out of the entity_id + attributes concept
GNU General Public License v3.0
198 stars 23 forks source link

[FR] add "index" column #127

Open ildar170975 opened 6 months ago

ildar170975 commented 6 months ago

Consider this config:

- name: some index
  data: _index
  start_from: 1

which creates: image

Here: _index - a directive to use an incrementing index (starting from start_from) start_from - first value of the index (default 1)

This column cannot be selected for sorting. Also, sorting by a header is disabled for this column. Values of the index are always incrementing.

A column with _index may be placed as the 1st, 2nd, ... whatever. Also, imho there is no need to limit a number of these columns in a config (although a user may need only one).