Skip to main content

Interface: UseQueryOpts<IS, CTX, OS>

Defined in: react/hooks.ts:361

Options for the useQuery hook.

Extends

Type Parameters

Type ParameterDefault type
IS extends Schema-
CTX extends ReadonlyJSONValue-
OS extends ISIS

Properties

PropertyTypeDescriptionInherited fromDefined in
ctx?CTXOptional context data passed to predicate and sort functionsOmit.ctxrepo/query.ts:143
id?stringOptional unique identifier for this queryOmit.idrepo/query.ts:141
limit?numberOptional maximum number of results to returnOmit.limitrepo/query.ts:145
liveUpdates?booleanWhen true (default), query membership and sort order update immediately when a ManagedItem is edited via set(), without waiting for the 300ms commit delay. Set to false to revert to commit-only update behavior. Rebase events are always ignored since they do not change the document's logical value.Omit.liveUpdatesrepo/query.ts:153
predicate?Predicate<IS, CTX>Optional predicate function to filter itemsOmit.predicaterepo/query.ts:130
schema?ISOptional schema to restrict query results toOmit.schemarepo/query.ts:139
showIntermittentResults?booleanIf true, updates UI during the initial scan. If false, waits until scanning is complete.-react/hooks.ts:370
sortBy?SortDescriptor<OS, CTX> | keyof OS["fields"]Optional function or field name to determine sort order of results. If a function is provided, it will be used as a custom comparator. If a field name is provided, results will be sorted by that field's values using standard comparison rules.Omit.sortByrepo/query.ts:135
sortDescending?booleanOptional flag that if true, flips the natural order of the sortByOmit.sortDescendingrepo/query.ts:137
sourceQuerySource<IS, OS>The source repository, query or path to query fromOmit.sourcerepo/query.ts:128