asasvirtuais 2.2.7 → 2.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -186,12 +186,14 @@ export function FilterForm<TSchema extends TableSchema>({
|
|
|
186
186
|
schema,
|
|
187
187
|
table,
|
|
188
188
|
defaults,
|
|
189
|
+
autoTrigger,
|
|
189
190
|
onSuccess,
|
|
190
191
|
children,
|
|
191
192
|
}: {
|
|
192
193
|
schema: TSchema
|
|
193
194
|
table: string
|
|
194
195
|
defaults?: Partial<ListProps<z.infer<TSchema['readable']>>>
|
|
196
|
+
autoTrigger?: boolean
|
|
195
197
|
onSuccess?: (result: z.infer<TSchema['readable']>[]) => void
|
|
196
198
|
children: React.ReactNode | (
|
|
197
199
|
(props: ReturnType<typeof useActionProvider<ListProps<z.infer<TSchema['readable']>>, z.infer<TSchema['readable']>[]>>
|
|
@@ -217,7 +219,7 @@ export function FilterForm<TSchema extends TableSchema>({
|
|
|
217
219
|
defaults={(defaults || { query: {} }) as ListProps<Readable>}
|
|
218
220
|
>
|
|
219
221
|
{fields => (
|
|
220
|
-
<ActionProvider<ListProps<Readable>, Readable[]> action={callback} params={fields.fields}>
|
|
222
|
+
<ActionProvider<ListProps<Readable>, Readable[]> action={callback} params={fields.fields} autoTrigger={autoTrigger}>
|
|
221
223
|
{typeof children === 'function' ? (
|
|
222
224
|
form => children({ ...form, ...fields })
|
|
223
225
|
) : (
|
|
@@ -249,7 +251,7 @@ export function useUpdateForm<TSchema extends TableSchema>(schema: TSchema) {
|
|
|
249
251
|
}
|
|
250
252
|
}
|
|
251
253
|
|
|
252
|
-
export function
|
|
254
|
+
export function useFilterForm<TSchema extends TableSchema>(schema: TSchema) {
|
|
253
255
|
return {
|
|
254
256
|
...useFields<z.infer<TSchema['readable']>>(),
|
|
255
257
|
...useAction<z.infer<TSchema['readable']>,
|