Open jhemak opened 8 months ago
This is already implemented in flex-table-card https://github.com/custom-cards/flex-table-card/blob/master/docs/example-cfg-sorting-strict.md
Thanks, I came across that earlier but it doesn't seem to work for me. Do you have a working example?
This works ... in alphabetical order
clickable: true
columns:
- name: Name
prop: name
- attr: available
id: available
modify: x || "false"
name: Online
- attr: rssi
name: RSSI
- name: NWK
prop: nwk
sort_by:
- name
type: custom:zha-network-card
This works ... in numeric order from worst connection to best
clickable: true
columns:
- name: Name
prop: name
- attr: available
id: available
modify: x || "false"
name: Online
- attr: rssi
name: RSSI
- name: NWK
prop: nwk
sort_by:
- rssi
type: custom:zha-network-card
This does not ... neither alphabetical on name nor in numeric order on RSSI ... seems essentially a random order.
clickable: true
columns:
- name: Name
prop: name
- attr: available
id: available
modify: x || "false"
name: Online
- attr: rssi
name: RSSI
- name: NWK
prop: nwk
sort_by:
- rssi
- name
type: custom:zha-network-card
@StancuFlorin just circling back here - any idea what I am doing wrong? Thanks!
Is there a way to specify two fields to sort on? For example, first by availability and then by name? I have tried various ways but have not been able to get that to work. Thank you!