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

Implement filtering of ScatterMap and Data Grid #35

Open
joemoorhouse opened this issue Jun 24, 2022 · 2 comments
Open

Implement filtering of ScatterMap and Data Grid #35

joemoorhouse opened this issue Jun 24, 2022 · 2 comments
Assignees

Comments

@joemoorhouse
Copy link
Collaborator

Possible approach is to use

const apiRef = useGridApiRef();
See
https://mui.com/x/react-data-grid/state/
e.g.
const visibleRows = gridPaginatedVisibleSortedGridRowIdsSelector(apiRef);

This can allow us to use the Data Grid filtering but update on map

@joemoorhouse joemoorhouse changed the title implement filtering of ScatterMap and Data Grid Implement filtering of ScatterMap and Data Grid Jun 24, 2022
@negillett
Copy link
Collaborator

It looks like apiRef is exclusive to DataGridPro so I'm not quite sure how to proceed. It doesn't look like there's an alternative means of finding the filter results or selected rows.
@joemoorhouse

@joemoorhouse
Copy link
Collaborator Author

Hi @negillett, yes I think you're right. Given we want to keep with DataGrid (not Pro) for the reference UI, I think maybe we need to build our own filter before display in Grid and map?
Looking at the Mui source, it seems that FormControl and Select are being used (and are doing much of the heavy-lifting):
https://mui.com/material-ui/react-select/
'Small Size' example looks interesting to me.
What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants