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

🐛 : Fixed cramped filter columns in QuickFilters #586

Merged
merged 2 commits into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions packages/power-bi/src/lib/components/QuickFilter/QuickFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,14 @@ const StyledFilterButtons = styled.div`
const StyledQuickFilterWrapper = styled.div`
display: grid;
width: 100%;
justify-content: flex-end;
grid-template-columns: repeat(auto-fit, minmax(60px, max-content));
gap: 2em;
justify-content: flex-start;
grid-template-columns: repeat(auto-fit, minmax(max-content, 50px));
grid-template-rows: 1fr;
gap: 10px;
align-items: center;
overflow-x: hidden;
padding-left: 10px;
padding-right: 10px;
`;

const FilterButtonContainer = styled.div`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ export const PowerBiFilterGroup = ({

if (!activeFilters) return null;
const isAllChecked = activeFilters.length === 0 || activeFilters.length === group.filterVals.length;

return (
<div style={{ height: '50px', display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<>
<StyledFilterGroupWrapper onClick={() => setIsOpen((s) => !s)} ref={anchorEl}>
<div>
{getFilterHeaderText(
Expand All @@ -48,6 +49,6 @@ export const PowerBiFilterGroup = ({
onCloseMenu={() => setIsOpen(false)}
/>
)}
</div>
</>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import { tokens } from '@equinor/eds-tokens';
import styled from 'styled-components';

export const StyledFilterGroupWrapper = styled.div`
height: auto;
width: auto;
height: 50px;
width: min-content;
display: flex;
align-items: center;
cursor: pointer;
justify-content: center;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
Expand Down
Loading