Add ability to force picker width (#1093)

This commit is contained in:
Charles Bochet
2023-08-05 15:41:18 -07:00
committed by GitHub
parent 35395c2e67
commit 14f9e892d1
7 changed files with 28 additions and 7 deletions

View File

@ -12,6 +12,7 @@ export type OwnProps = {
onSubmit: (newCompany: EntityForSelect | null) => void;
onCancel?: () => void;
createModeEnabled?: boolean;
width?: number;
};
export function CompanyPickerCell({
@ -19,6 +20,7 @@ export function CompanyPickerCell({
onSubmit,
onCancel,
createModeEnabled,
width,
}: OwnProps) {
const [, setIsCreating] = useRecoilScopedState(isCreateModeScopedState);
@ -46,6 +48,7 @@ export function CompanyPickerCell({
return (
<SingleEntitySelect
width={width}
onCreate={createModeEnabled ? handleCreate : undefined}
onCancel={onCancel}
onEntitySelected={handleEntitySelected}