Better handle falsy values in Select & GraphQL cells

Signed-off-by: Émile Ré <nemile.re@gmail.com>
This commit is contained in:
Émile Ré
2025-12-02 10:47:40 +04:00
parent 57e267afe0
commit 519dd716b3
5 changed files with 17 additions and 13 deletions

View File

@@ -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,
);