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.
Ability to set alignment in filter text #694
Open
Description
My columns are left aligned rather than right aligned:
style_cell_conditional=[
{'if': {'column_id': 'rating'},
'width': '40px'},
{'if': {'column_id': 'date'},
'width': '80px',
'text-align': 'left'},
{'if': {'column_id': 'reviews'},
'width': 'calc(100% - 120px)',
'text-align': 'left'},
{'if': {'column_id': 'rating'}}
],
I'd expect that the filter's alignment would match the column's by default. So, my left aligned columns would have left aligned filter inputs.
Currently, the workaround is to override this in CSS:
.dash-filter input {
text-align: left !important;
padding-left: 5px !important;
}
(Note that style_filter={'text-align': 'left', 'padding-left': '5px'}
doesn't get applied to the input element and so it doesn't work either.)