@sanity/form-builder
Version:
Sanity form builder
28 lines • 1.14 kB
TypeScript
import React from 'react';
import { ArraySchemaType, Marker, Path } from '@sanity/types';
import { FormFieldPresence } from '@sanity/base/presence';
declare type Focusable = {
focus: () => void;
};
declare type OptionsArrayInputProps = {
type: ArraySchemaType;
markers?: Marker[];
value?: unknown[];
level?: number;
readOnly?: boolean;
onChange?: (...args: any[]) => any;
presence: FormFieldPresence[];
onFocus: (path: Path) => void;
onBlur: () => void;
};
export default class OptionsArrayInput extends React.PureComponent<OptionsArrayInputProps> {
_element: Focusable | null;
handleChange: (isChecked: any, optionValue: any) => void;
getMemberTypeOfItem(option: any): import("@sanity/types").BooleanSchemaType | import("@sanity/types").StringSchemaType | import("@sanity/types").NumberSchemaType | import("@sanity/types").ObjectSchemaType | import("@sanity/types").ReferenceSchemaType;
setElement: (el: Focusable | null) => void;
focus(): void;
handleFocus: (index: number) => void;
render(): React.JSX.Element;
}
export {};
//# sourceMappingURL=OptionsArrayInput.d.ts.map