Skip to content

Commit efe3b8e

Browse files
committed
fix types
1 parent cad8696 commit efe3b8e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

packages/compass-components/src/components/combobox-with-custom-option.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,8 @@ import React, { useState, useMemo } from 'react';
22
import { Combobox } from './leafygreen';
33
import type { ComboboxProps } from '@leafygreen-ui/combobox';
44

5-
type SelectValueType<T extends boolean> = NonNullable<
6-
ComboboxProps<T>['value']
7-
>;
8-
type OnChangeType<T extends boolean> = NonNullable<
9-
ComboboxProps<T>['onChange']
10-
>;
5+
type SelectValueType<T extends boolean> = Required<ComboboxProps<T>>['value'];
6+
type OnChangeType<T extends boolean> = Required<ComboboxProps<T>>['onChange'];
117
type ComboboxWithCustomOptionProps<T extends boolean, K> = ComboboxProps<T> & {
128
options: K[];
139
renderOption: (option: K, index: number, isCustom: boolean) => JSX.Element;

0 commit comments

Comments
 (0)