Skip to content
Merged
Prev Previous commit
Next Next commit
restore width prop in UserMenu component
  • Loading branch information
rafrdz committed Aug 28, 2025
commit 4ec6776dc1f8c1040d8b5ed3810eb05356a97c00
5 changes: 3 additions & 2 deletions site/src/components/Filter/UserFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,10 @@ export type UserFilterMenu = ReturnType<typeof useUserFilterMenu>;
interface UserMenuProps {
menu: UserFilterMenu;
placeholder?: string;
width?: number;
}

export const UserMenu: FC<UserMenuProps> = ({ menu, placeholder }) => {
export const UserMenu: FC<UserMenuProps> = ({ menu, width, placeholder }) => {
return (
<SelectFilter
label="Select user"
Expand All @@ -104,7 +105,7 @@ export const UserMenu: FC<UserMenuProps> = ({ menu, placeholder }) => {
onChange={menu.setQuery}
/>
}
width={DEFAULT_USER_FILTER_WIDTH}
width={width}
/>
);
};
2 changes: 1 addition & 1 deletion site/src/pages/AuditPage/AuditFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export const AuditFilter: FC<AuditFilterProps> = ({ filter, error, menus }) => {
<>
<ResourceTypeMenu width={width} menu={menus.resourceType} />
<ActionMenu width={width} menu={menus.action} />
<UserMenu menu={menus.user} />
<UserMenu width={width} menu={menus.user} />
{menus.organization && (
<OrganizationsMenu width={width} menu={menus.organization} />
)}
Expand Down
2 changes: 1 addition & 1 deletion site/src/pages/ConnectionLogPage/ConnectionLogFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const ConnectionLogFilter: FC<ConnectionLogFilterProps> = ({
error={error}
options={
<>
<UserMenu placeholder="All owners" menu={menus.user} />
<UserMenu placeholder="All owners" menu={menus.user} width={width} />
<StatusMenu menu={menus.status} width={width} />
<TypeMenu menu={menus.type} width={width} />
{menus.organization && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export const WorkspacesFilter: FC<WorkspaceFilterProps> = ({
)}
options={
<>
{userMenu && <UserMenu menu={userMenu} />}
{userMenu && <UserMenu width={width} menu={userMenu} />}
<TemplateMenu width={width} menu={templateMenu} />
<StatusMenu width={width} menu={statusMenu} />
{organizationsActive && (
Expand Down
Loading