Skip to content

Remove row´s #178

@stejo388

Description

@stejo388

Hi,

I would like to "remove/hide" rows depending on different logic / value in a cell.

As an example if the value is 1001 in the cell I would like to remove that row so it is not shown. I have solved this today by using CSS and visibility:collapse. That solves the issue in some browser but in Home Assistants app it don´t look nice, it adds a lot of space.

Is there a way to do that?

Here is how I solved it today:

 - name: Vintage
    data: inventory
    hidden: null
    modify: |-
      let result =      
        x.Vintage;
        parseInt(x.Vintage) == 1001
          ? '<div class="vintage-nv">' + result + '</div>'
            : result    

css:
  tr:has(> td div.vintage-nv): visibility:collapse !important;


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions