Skip to content

Commit

Permalink
Fix saved filter list double scrollbar
Browse files Browse the repository at this point in the history
  • Loading branch information
DingDongSoLong4 committed Dec 26, 2023
1 parent 07b4c40 commit 2324c56
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 10 deletions.
22 changes: 12 additions & 10 deletions ui/v2.5/src/components/List/SavedFilterList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -311,20 +311,22 @@ export const SavedFilterList: React.FC<ISavedFilterListProps> = ({
function maybeRenderSetDefaultButton() {
if (persistState === PersistanceLevel.ALL) {
return (
<Button
className="set-as-default-button"
variant="secondary"
size="sm"
onClick={() => onSetDefaultFilter()}
>
{intl.formatMessage({ id: "actions.set_as_default" })}
</Button>
<div className="mt-1">
<Button
className="set-as-default-button"
variant="secondary"
size="sm"
onClick={() => onSetDefaultFilter()}
>
{intl.formatMessage({ id: "actions.set_as_default" })}
</Button>
</div>
);
}
}

return (
<div>
<>
{maybeRenderDeleteAlert()}
{maybeRenderOverwriteAlert()}
<InputGroup>
Expand Down Expand Up @@ -359,6 +361,6 @@ export const SavedFilterList: React.FC<ISavedFilterListProps> = ({
</InputGroup>
{renderSavedFilters()}
{maybeRenderSetDefaultButton()}
</div>
</>
);
};
11 changes: 11 additions & 0 deletions ui/v2.5/src/components/List/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,14 @@ input[type="range"].zoom-slider {
.saved-filter-list-menu {
width: 300px;

&.dropdown-menu.show {
display: flex;
flex-direction: column;
}

.set-as-default-button {
float: right;
margin-right: 0.5rem;
}

.LoadingIndicator {
Expand Down Expand Up @@ -94,12 +100,17 @@ input[type="range"].zoom-slider {
align-items: center;
display: inline;
overflow-x: hidden;
padding-left: 1.25rem;
padding-right: 0.25rem;
text-overflow: ellipsis;
}

.btn-group {
margin-left: auto;

.btn {
border-radius: 0;
}
}

.delete-button {
Expand Down

0 comments on commit 2324c56

Please sign in to comment.