Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to hide hr if table filter is empty

sa_mejia March 4, 2021

Hello

I'm trying to hide a <hr/> rule inside a table filter when the table filter returns no values. 
Is there any way to achieve this? Screenshot_11.png

1 answer

1 vote
Katerina Kovriga _Stiltsoft_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 5, 2021

Hi @sa_mejia ,

I can suggest wrapping your Table Filter macro into the Table Transformer macro:

2021-03-05_12h20_46.png

2021-03-05_12h21_00.png

2021-03-05_12h21_06.png

So when you don't have any suitable rows to display, you'll get a blue info message that there are no any rows returned (not the empty table header row as you had before).

sa_mejia March 8, 2021

Hi. 
Thanks for your reply, 
I was thinking in something that allows me to hide some elements that are inside of this filter like the hr (horizontal rule) when there's a filter applied and there are no matches, probably via CSS.

something like .tablefilter:empty(){ hr class-name {display : none;}}

Katerina Kovriga _Stiltsoft_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 8, 2021

We often use CSS to hide specific items from the Table Filter menu. Here is an example of several expressions to hide the "Hide columns" option for the different variants of the macro usage.

What exactly do you need to do? Do you use a filtering panel and when there are no any results you want to hide it? So your colleagues won't see it and won't know about the applied filters?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events