Change to using arrow functions (#1603)
* Change to using arrow functions Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: Matheus <matheus_benini@hotmail.com> * Add lint rule --------- Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: Matheus <matheus_benini@hotmail.com> Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -28,7 +28,7 @@ export type SingleEntitySelectBaseProps<
|
||||
selectedEntity?: CustomEntityForSelect;
|
||||
};
|
||||
|
||||
export function SingleEntitySelectBase<
|
||||
export const SingleEntitySelectBase = <
|
||||
CustomEntityForSelect extends EntityForSelect,
|
||||
>({
|
||||
EmptyIcon,
|
||||
@ -38,7 +38,7 @@ export function SingleEntitySelectBase<
|
||||
onCancel,
|
||||
onEntitySelected,
|
||||
selectedEntity,
|
||||
}: SingleEntitySelectBaseProps<CustomEntityForSelect>) {
|
||||
}: SingleEntitySelectBaseProps<CustomEntityForSelect>) => {
|
||||
const containerRef = useRef<HTMLDivElement>(null);
|
||||
const entitiesInDropdown = [selectedEntity, ...entitiesToSelect].filter(
|
||||
(entity): entity is CustomEntityForSelect =>
|
||||
@ -105,4 +105,4 @@ export function SingleEntitySelectBase<
|
||||
)}
|
||||
</StyledDropdownMenuItemsContainer>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user