Skip to content

Commit

Permalink
Align filter labels properly
Browse files Browse the repository at this point in the history
  • Loading branch information
terotik committed Oct 13, 2023
1 parent 37d28ca commit 1cca240
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions components/actions/ActionListFilters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,12 @@ const MainCategory = styled.div`
}
`;

const FilterColumn = styled(Col)`
display: flex;
flex-direction: column;
justify-content: flex-end;
`;

function sortDepthFirst<Type>(
items: Type[],
compareItem: (a: Type, b: Type) => number,
Expand Down Expand Up @@ -481,7 +487,7 @@ abstract class DefaultFilter<Value extends FilterValue>
) {
const _isMulti = isMulti ?? false;
return (
<Col sm={this.sm} md={this.md} lg={this.lg} key={this.id}>
<FilterColumn sm={this.sm} md={this.md} lg={this.lg} key={this.id}>
<ActionListDropdownInput
isMulti={_isMulti}
id={this.id}
Expand All @@ -492,7 +498,7 @@ abstract class DefaultFilter<Value extends FilterValue>
onChange={onChange}
options={this.options}
/>
</Col>
</FilterColumn>
);
}
}
Expand Down Expand Up @@ -806,7 +812,7 @@ class ActionNameFilter implements ActionListFilter<string | undefined> {
t: TFunction
) {
return (
<Col m={this.sm} md={this.md} lg={this.lg} key={this.id}>
<FilterColumn m={this.sm} md={this.md} lg={this.lg} key={this.id}>
<ActionListTextInput
id={this.id}
label={this.getLabel(t)}
Expand All @@ -815,7 +821,7 @@ class ActionNameFilter implements ActionListFilter<string | undefined> {
currentValue={value}
inputRef={this.ref}
/>
</Col>
</FilterColumn>
);
}
}
Expand Down

0 comments on commit 1cca240

Please sign in to comment.