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

Add boolean dropdown filters for heatmap #213

Merged
merged 16 commits into from
May 21, 2024
Merged

Conversation

codytodonnell
Copy link
Collaborator

Adds support for boolean filter controls. Uses a dropdown with True, False, or Any as the options where Any is the empty state of the filter. Includes type-support for a new filter type called 'bool'.

@@ -177,7 +177,7 @@ export type ColumnMeta = {
display_name?: string;
} & (
| {
type: 'date' | 'int' | 'float';
type: 'date' | 'int' | 'float' | 'bool';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unless this causes type issues, I would remove bool from this section.

Suggested change
type: 'date' | 'int' | 'float' | 'bool';
type: 'date' | 'int' | 'float';

src/common/components/FilterChip.tsx Fixed Show resolved Hide resolved
} else if (filter.value === false || filter.value === 0) {
return 'false';
} else {
return 'any';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A helpful change!

src/features/collections/CollectionDetail.tsx Show resolved Hide resolved
@codytodonnell codytodonnell merged commit 05e03e3 into main May 21, 2024
4 checks passed
@codytodonnell codytodonnell deleted the feature/boolean-filter branch May 21, 2024 16:25
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

Successfully merging this pull request may close these issues.

2 participants