Get empty table state

Hey there,
In my table, I am filtering the values depending on specific user properties. F.e. isGlobal, orga_id etc. So data displayed can be empty in the table. I see "0 results" at the bottom, but can not find the table property to further process it.
image

In my use case, I need to hide this area, when table has no entries.

And obviously show it, if the table has entries.

I tried checking: {{ templateLibrary.selectedDataIndex === undefined }} to hide the container, when true. However this this needs to set the table.selectedRow() to 0 (so it gets "undefined") and various places and this seems hacky.

Any idea how to get the real value?
image

Update: I managed to somehow solve it in adding a js function with:
return _.isEmpty(await templateLibrary.getDisplayedData())
saving to a variable and checking this for true/false.

however, would be nice to have a more "direct" approach from some property.

Hello @Dimitrios!

Glad you were able to get it working :smiley:

If your goal is to hide a table when there is no data, you can use 'Hidden' property under 'Appearance' why you are inspecting the table, and give it some Javascript for when you want it to be hidden.

For example you can do something like {{ myTable.data.length === 0}} so that when the data is filtered and there are no results/data to be displayed the table will be hidden.

This will run after the query, instead of the workaround you have using .isEmpty() on the query result.

Let me know if that works! .selectedDataIndex will use the index of the row which you clicked on, so if there are results but none are clicked there is no index.

What is the 'real value' that you are trying to get?