2951-fix: Editing view filters button fix (#2954)

* 2951-fix: Editing view filters button fix

* Fixed lint

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
Kanav Arora 2023-12-13 22:30:43 +05:30 committed by GitHub
parent 856b78abc7
commit 4673a302c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,6 +16,8 @@ import { useViewBar } from '@/views/hooks/useViewBar';
import { useViewScopedStates } from '../hooks/internal/useViewScopedStates';
const StyledContainer = styled.div`
background: ${({ theme }) => theme.color.blue};
border-radius: ${({ theme }) => theme.border.radius.md};
display: inline-flex;
margin-right: ${({ theme }) => theme.spacing(2)};
position: relative;
@ -53,29 +55,29 @@ export const UpdateViewButtonGroup = ({
}
return (
<DropdownScope dropdownScopeId={UpdateViewDropdownId}>
<Dropdown
dropdownHotkeyScope={hotkeyScope}
clickableComponent={
<StyledContainer>
<ButtonGroup size="small" accent="blue">
<Button title="Update view" onClick={handleViewSubmit} />
<Button size="small" Icon={IconChevronDown} />
</ButtonGroup>
</StyledContainer>
}
dropdownComponents={
<>
<DropdownMenuItemsContainer>
<MenuItem
onClick={handleCreateViewButtonClick}
LeftIcon={IconPlus}
text="Create view"
/>
</DropdownMenuItemsContainer>
</>
}
/>
</DropdownScope>
<StyledContainer>
<ButtonGroup size="small" accent="blue">
<Button title="Update view" onClick={handleViewSubmit} />
<DropdownScope dropdownScopeId={UpdateViewDropdownId}>
<Dropdown
dropdownHotkeyScope={hotkeyScope}
clickableComponent={
<Button size="small" accent="blue" Icon={IconChevronDown} />
}
dropdownComponents={
<>
<DropdownMenuItemsContainer>
<MenuItem
onClick={handleCreateViewButtonClick}
LeftIcon={IconPlus}
text="Create view"
/>
</DropdownMenuItemsContainer>
</>
}
/>
</DropdownScope>
</ButtonGroup>
</StyledContainer>
);
};