packages/material-ui-lab/src/internal/pickers/utils.ts/createDelegatedEventHandler
export function createDelegatedEventHandler<TEvent>(
  fn: (event: TEvent) => void,
  onEvent?: (event: TEvent) => void,
) {
  return (event: TEvent) => {
    fn(event);

    if (onEvent) {
      onEvent(event);
    }
  };
}