fix(idaa): resolve BB comment loop and parent mapping issues
- Switched to create_nested_obj_v3 for establishing parent-child links. - Optimized background load trigger with untrack to prevent infinite loops. - Resolved MySQL IntegrityError (missing post_id) during comment creation. - Hardened view component reactivity for Svelte 5.
This commit is contained in:
@@ -30,16 +30,15 @@
|
||||
import Comp__post_comment_obj_id_edit from './ae_idaa_comp__post_comment_obj_id_edit.svelte';
|
||||
import AE_Comp_Hosted_Files_Download_Button from '$lib/ae_core/ae_comp__hosted_files_download_button.svelte';
|
||||
|
||||
let ae_promises: key_val = $state({});
|
||||
import { untrack } from 'svelte';
|
||||
|
||||
$effect(() => {
|
||||
const post_id = $idaa_slct.post_id;
|
||||
if (post_id) {
|
||||
if (post_id && post_id !== untrack(() => $idaa_trig.post_id)) {
|
||||
if (log_lvl) {
|
||||
console.log(`Post ID selected: ${post_id}`);
|
||||
console.log(`Post Object selected: `, $lq__post_obj);
|
||||
}
|
||||
// Trigger background load
|
||||
// Trigger background load only if it's a new ID
|
||||
$idaa_trig.post_id = post_id;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user