@rkosafo/cai.components 0.0.44 → 0.0.46
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.
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
mentionableItems = [],
|
|
19
19
|
onMessage,
|
|
20
20
|
previewPageTitle = 'Preview Attachment',
|
|
21
|
-
onSlash
|
|
21
|
+
onSlash,
|
|
22
|
+
class: className = ''
|
|
22
23
|
}: ChatInputProps = $props();
|
|
23
24
|
|
|
24
25
|
let message = $state<ChatInputMessage>({
|
|
@@ -122,6 +123,7 @@
|
|
|
122
123
|
{mentionableItems}
|
|
123
124
|
onMention={handleMention}
|
|
124
125
|
{onSlash}
|
|
126
|
+
class={className}
|
|
125
127
|
/>
|
|
126
128
|
|
|
127
129
|
<div class="mx-4 flex items-center justify-between">
|
|
@@ -100,6 +100,7 @@
|
|
|
100
100
|
let deleteLoading = $state(false);
|
|
101
101
|
let isValid = $state(false);
|
|
102
102
|
let viewing = $state(false);
|
|
103
|
+
let dataToSave = $state<any>({});
|
|
103
104
|
|
|
104
105
|
function addNew() {
|
|
105
106
|
if (onAddNew) {
|
|
@@ -273,8 +274,10 @@
|
|
|
273
274
|
}
|
|
274
275
|
|
|
275
276
|
async function handleAction({ action, data }: { action: string; data: FormData }) {
|
|
276
|
-
let formData = data;
|
|
277
|
-
|
|
277
|
+
// let formData = data;
|
|
278
|
+
let formData = dataToSave;
|
|
279
|
+
|
|
280
|
+
// console.log({ formData });
|
|
278
281
|
try {
|
|
279
282
|
isLoading = true;
|
|
280
283
|
const ret = editing
|
|
@@ -296,6 +299,7 @@
|
|
|
296
299
|
|
|
297
300
|
hideForm = true;
|
|
298
301
|
activeEntry = {};
|
|
302
|
+
dataToSave = {};
|
|
299
303
|
closeSideModal();
|
|
300
304
|
} else {
|
|
301
305
|
toast.error(ret?.message || 'Failed');
|
|
@@ -334,6 +338,7 @@
|
|
|
334
338
|
function handleFormChange(val: IFormChangeProp<any>) {
|
|
335
339
|
const { values, isValid: validForm } = val;
|
|
336
340
|
isValid = validForm;
|
|
341
|
+
dataToSave = values;
|
|
337
342
|
}
|
|
338
343
|
|
|
339
344
|
$effect(() => {
|