@rkosafo/cai.components 0.0.51 → 0.0.53
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/dist/types/index.d.ts
CHANGED
|
@@ -682,6 +682,7 @@ export interface DatatableProps<T = any> extends TableProps {
|
|
|
682
682
|
editor?: Snippet<[DatatableEditorFormProps]>;
|
|
683
683
|
customFilter?: Snippet<[TableFilter]>;
|
|
684
684
|
modalFooter?: Snippet;
|
|
685
|
+
showModalButtons?: boolean;
|
|
685
686
|
}
|
|
686
687
|
export interface DatatableEditorFormProps {
|
|
687
688
|
recordId?: number | string | null;
|
|
@@ -81,6 +81,7 @@
|
|
|
81
81
|
return { success: false, data: null, error: null } as any;
|
|
82
82
|
},
|
|
83
83
|
modalFooter,
|
|
84
|
+
showModalButtons = true,
|
|
84
85
|
...otherProps
|
|
85
86
|
}: DatatableProps = $props();
|
|
86
87
|
|
|
@@ -507,12 +508,14 @@
|
|
|
507
508
|
})}
|
|
508
509
|
|
|
509
510
|
{#snippet footer()}
|
|
510
|
-
{#if
|
|
511
|
-
{
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
511
|
+
{#if showModalButtons}
|
|
512
|
+
{#if modalFooter}
|
|
513
|
+
{@render modalFooter()}
|
|
514
|
+
{:else if !viewing}
|
|
515
|
+
<Button disabled={!isValid} loading={isLoading} type="submit" class="w-full" value="submit"
|
|
516
|
+
>Submit</Button
|
|
517
|
+
>
|
|
518
|
+
{/if}
|
|
516
519
|
{/if}
|
|
517
520
|
{/snippet}
|
|
518
521
|
</Drawer>
|