Better handle falsy values in Select & GraphQL cells
Signed-off-by: Émile Ré <nemile.re@gmail.com>
This commit is contained in:
@@ -24,7 +24,7 @@ type Props<Q extends OperationType, T> = {
|
||||
| { defaultValue: T[]; multiple: true }
|
||||
);
|
||||
|
||||
export function GraphQLCell<Q extends OperationType, T>(props: Props<Q, T>) {
|
||||
export function GraphQLCell<Q extends OperationType, T extends NonNullable<unknown>>(props: Props<Q, T>) {
|
||||
const [value, setValue, valueRef] = useStateWithRef<T | T[] | undefined>(
|
||||
props.defaultValue,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user