UNPKG

sanity-plugin-computed-field

Version:

Sanity plugin that computes a field's value based on other fields or relationships with its document or external data. In other words, this field memoizes a value in a document using GROQ to lookup and custom javascript to compute the value from those GRO

13 lines (10 loc) 339 B
import {BooleanComponents, defineType} from 'sanity' import {ComputedBooleanInput} from '../components/ComputedBooleanInput' export const computedBooleanSchema = defineType({ title: 'Computed Boolean', type: 'boolean', name: 'computedBoolean', components: { input: ComputedBooleanInput as BooleanComponents['input'], }, })