Skip to content
This repository was archived by the owner on Jun 4, 2024. It is now read-only.
This repository was archived by the owner on Jun 4, 2024. It is now read-only.

filter_query of style_**_conditional cannot find empty value #544

@laoxu0212

Description

@laoxu0212

Here are the background and the requirement:

For each row of my data, some points are missing, which will leave some cells blank.
e.g.
columns=[{'name': 'a', 'id': 'a'}, {'name': 'b', 'id': 'b'}, {'name': 'c', 'id': 'c'}]
data=[{'a':1, 'b':2}, {'b':1, 'c':2},{'a':2, 'c':3}]

I would like to highlight some missing data by changing its cell's background color.

Therefore, I should use

style_data_conditional = [{
'if':{
'column_id': 'c',
'filter_query': '{c} = ????'}},
'backgroundColor': "#3D9970"
]

to filter the empty cell.

But I don't know what to write for ???? in code. I did not find it in the documents neither.

I know I could modify my data like data[0]['c'] = 'N/A' and filter that out. But it seems that the Operators from https://dash.plot.ly/datatable/filtering can only find valid data, is there or will there be anyway to filter out those empty cell without making my data redundant?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions