Bug fix for search results not showing.
This commit is contained in:
@@ -148,7 +148,7 @@ function preventDefault(fn) {
|
||||
$effect(() => {
|
||||
if ($events_trigger == 'load__event_session_obj_li' && $events_slct.event_id) {
|
||||
console.log(`load__event_session_obj_li() $events_slct.event_id=${$events_slct.event_id}`);
|
||||
|
||||
log_lvl = 1;
|
||||
$events_trigger = null;
|
||||
|
||||
if ($events_loc.pres_mgmt.save_search_text) {
|
||||
@@ -173,16 +173,15 @@ $effect(() => {
|
||||
}
|
||||
|
||||
// if ($events_sess.pres_mgmt.status_qry__search == 'done' && $events_slct?.event_session_obj_li) {
|
||||
log_lvl = 1;
|
||||
if ($events_trigger == 'search_done') {
|
||||
$events_trigger = null;
|
||||
$events_sess.pres_mgmt.status_qry__search = null;
|
||||
|
||||
if (log_lvl) {
|
||||
console.log('TEST SEARCH - Search done. Pulling out the event_session_id_randoms...');
|
||||
console.log('TEST search done: Pulling out the event_session_id_randoms...');
|
||||
}
|
||||
|
||||
|
||||
|
||||
// We need to loop through the array of objects and get the event_session_id_random from each object a new list of event_session_id_randoms. Then we can use this list to get the full objects from the database.
|
||||
let tmp_li = []; // This is to prevent the array from constantly updating and triggering the liveQuery.
|
||||
if ($events_slct.event_session_obj_li && $events_slct.event_session_obj_li.length) {
|
||||
@@ -193,7 +192,7 @@ $effect(() => {
|
||||
}
|
||||
}
|
||||
event_session_id_random_li = tmp_li;
|
||||
// console.log(`TEST search: event_session_id_random_li`, $state.snapshot(event_session_id_random_li));
|
||||
console.log(`TEST search results: event_session_id_random_li`, $state.snapshot(event_session_id_random_li));
|
||||
}
|
||||
});
|
||||
|
||||
@@ -591,22 +590,8 @@ max-w-max -->
|
||||
</div>
|
||||
|
||||
|
||||
<!-- {#if $lq__event_session_obj_li && $lq__event_session_obj_li?.length > 0 && event_session_id_random_li && event_session_id_random_li?.length > 0} -->
|
||||
<!-- {#if event_session_id_random_li && $lq__event_session_obj_li && $lq__event_session_obj_li?.length} -->
|
||||
{#if event_session_id_random_li}
|
||||
|
||||
<!-- <Comp_event_session_obj_li
|
||||
lq__event_session_obj_li={lq__event_session_obj_li}
|
||||
hide__session_location={$events_loc.pres_mgmt.hide__session_location}
|
||||
hide__session_poc={$events_loc.pres_mgmt.hide__session_poc || $events_loc.pres_mgmt.hide__session_li_poc_field}
|
||||
show__launcher_link={$ae_loc.administrator_access && $events_loc.pres_mgmt.show__launcher_link}
|
||||
show__launcher_link_legacy={$ae_loc.trusted_access && $events_loc.pres_mgmt.show__launcher_link_legacy}
|
||||
show__location_link={$events_loc.pres_mgmt.show__location_link}
|
||||
log_lvl={log_lvl}
|
||||
/> -->
|
||||
|
||||
<!-- link_to_type={'event'} -->
|
||||
<!-- link_to_id={$lq__event_obj?.event_id_random} -->
|
||||
<!-- This needs to be called only when there is a list of IDs ready. This should be done on the list wrapper the list itself. -->
|
||||
{#if event_session_id_random_li.length}
|
||||
|
||||
<Comp_event_session_obj_li_wrapper
|
||||
event_session_id_random_li={event_session_id_random_li}
|
||||
|
||||
@@ -4,8 +4,8 @@ interface Props {
|
||||
container_class_li?: string|Array<string>;
|
||||
// export let display_mode: string = 'default'; // 'default', 'compact', 'minimal', 'launcher'
|
||||
event_session_id_random_li?: Array<string>;
|
||||
link_to_type: string;
|
||||
link_to_id: string;
|
||||
link_to_type?: string;
|
||||
link_to_id?: string;
|
||||
log_lvl?: number;
|
||||
}
|
||||
|
||||
@@ -58,10 +58,11 @@ let lq__event_session_obj_li = $derived(liveQuery(async () => {
|
||||
}));
|
||||
</script>
|
||||
|
||||
|
||||
<!-- {#if $lq__event_session_obj_li?.length > 0} -->
|
||||
<Comp_event_session_obj_li
|
||||
container_class_li={container_class_li}
|
||||
lq__event_session_obj_li={lq__event_session_obj_li}
|
||||
log_lvl={log_lvl}
|
||||
>
|
||||
</Comp_event_session_obj_li>
|
||||
<!-- {/if} -->
|
||||
Reference in New Issue
Block a user