Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS of AG Grid floatingFilter option buggy #383

Closed
1 task done
maxschulz-COL opened this issue Mar 25, 2024 · 1 comment · Fixed by #388
Closed
1 task done

CSS of AG Grid floatingFilter option buggy #383

maxschulz-COL opened this issue Mar 25, 2024 · 1 comment · Fixed by #388
Assignees
Labels
Bug Report 🐛 Issue contains a bug report

Comments

@maxschulz-COL
Copy link
Contributor

maxschulz-COL commented Mar 25, 2024

Description

Floating filter not looking ideal. This sort of buggy behaviour may arise with a few other AG Grid options that we have not explicitly tested. In an ideal world we would build our own custom theme that takes care of all potential options automatically.

image

Expected behavior

Input field not cutting over the continuous line

Which package?

vizro

Package version

0.1.13

Python version

3

OS

Mac

How to Reproduce

import vizro.models as vm
import vizro.plotly.express as px
from vizro import Vizro
from vizro.tables import dash_ag_grid

df = px.data.gapminder(datetimes=True)

page = vm.Page(
    title="Enhanced AG Grid",
    components=[
        vm.AgGrid(
            title="Dash AG Grid",
            figure=dash_ag_grid(
                data_frame=df,
                columnDefs=[
                    {"field" : "country", 'floatingFilter': True},
                    {"field" : "continent"},
                    {"field" : "year"},
                    {"field" : "lifeExp", "cellDataType": "numeric"},
                    {"field" : "pop", "cellDataType": "numeric"},
                    {"field" : "gdpPercap", "cellDataType": "euro"},]

            )
        ),
    ],
    controls=[vm.Filter(column="continent")],
)
dashboard = vm.Dashboard(pages=[page])

Vizro().build(dashboard).run(port = 8051)

Output

No response

Code of Conduct

@maxschulz-COL maxschulz-COL added Bug Report 🐛 Issue contains a bug report Needs triage 🔍 Issue needs triaging and removed Needs triage 🔍 Issue needs triaging labels Mar 25, 2024
@huong-li-nguyen huong-li-nguyen self-assigned this Mar 26, 2024
@huong-li-nguyen
Copy link
Contributor

Thanks for raising! I took a look into this one, and this should be quick to fix in terms of CSS.

In terms of UI, if we want to turn on the floatingFilter in any of the examples in the docs, I think it's better if we simultaneously turn off the filter menu option in the header. Otherwise, it's confusing as the filter is present in both the header and the floatingFilter. However, I checked the configurations and somehow that's not possible - I've raised an issue on Dash here: plotly/dash-ag-grid#280

So for now, we can definitely fix the CSS as it's quick to do and otherwise it's unusable. But I wouldn't add an example with the floatingFilter in any of the official docs just yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Report 🐛 Issue contains a bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants