File tree Expand file tree Collapse file tree
packages/components/src/public/QueryModel Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -922,6 +922,13 @@ interface UseQueryModelsOptions {
922922 modelLoader ?: QueryModelLoader ;
923923}
924924
925+ /**
926+ * A hook that creates a managed set of QueryModels for a given QueryConfigMap returning InjectedQueryModels.
927+ * Functionally equivalent to withQueryModels but often more convenient because it doesn't require wrapping your
928+ * component. Note: changes to queryConfigs are not handled, useQueryModels only ever uses the original queryConfigs
929+ * object passed to it, as properly diffing the queryConfigs object is effectively impossible when considering user
930+ * changes to the models.
931+ */
925932export function useQueryModels ( queryConfigs : QueryConfigMap , options : UseQueryModelsOptions = { } ) : InjectedQueryModels {
926933 const { autoLoad = false , modelLoader } = options ;
927934 const [ searchParams , setSearchParams ] = useOptionalSearchParams ( ) ;
You can’t perform that action at this time.
0 commit comments