@xuda.io/runtime-bundle 1.0.696 → 1.0.697

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.
@@ -31536,21 +31536,22 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
31536
31536
  const wrapper_data = $wrapper.data();
31537
31537
  const refreshed_ds = _ds.dsSession;
31538
31538
 
31539
- // let elm_to_delete = [];
31540
- // const ts = Date.now();
31541
- // $.each($elm.find('*'), function (key, val) {
31542
- // let xu_ui_id = $(val).attr('xu-ui-id');
31543
- // if (xu_ui_id) {
31544
- // let new_id = xu_ui_id + ts;
31545
- // elm_to_delete.push(new_id);
31546
-
31547
- // $(val).attr('xu-ui-id', new_id).removeData();
31548
- // } else {
31549
- // $(val).remove();
31550
- // }
31551
- // });
31539
+ let elm_to_delete = [];
31540
+ const ts = Date.now();
31541
+ $.each($elm.find('xu-root-component-' + SESSION_ID).find('*'), function (key, val) {
31542
+ let xu_ui_id = $(val).attr('xu-ui-id');
31543
+ if (xu_ui_id) {
31544
+ let new_id = xu_ui_id + ts;
31545
+ elm_to_delete.push(new_id);
31546
+
31547
+ $(val).attr('xu-ui-id', new_id).removeData();
31548
+ }
31549
+ // else {
31550
+ // $(val).remove();
31551
+ // }
31552
+ });
31552
31553
 
31553
- $elm.empty();
31554
+ // $elm.empty();
31554
31555
  if ($elm.data()) {
31555
31556
  const new_$div = await func.UI.screen.render_ui_tree(
31556
31557
  SESSION_ID,
@@ -31567,10 +31568,10 @@ func.UI.screen.refresh_screen = async function (SESSION_ID, fields_changed_arr,
31567
31568
  elm_data.xuData.$root_container, // the wrapper root container
31568
31569
  );
31569
31570
 
31570
- // // remove old screen content
31571
- // $.each(elm_to_delete, async function (key, val) {
31572
- // $("[xu-ui-id='" + elm_to_delete + "']").remove();
31573
- // });
31571
+ // remove old screen content
31572
+ $.each(elm_to_delete, async function (key, val) {
31573
+ $("[xu-ui-id='" + elm_to_delete + "']").remove();
31574
+ });
31574
31575
 
31575
31576
  return;
31576
31577
  }
@@ -33876,7 +33877,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
33876
33877
  if ($nav && $nav.length) {
33877
33878
  // refresh made
33878
33879
  } else {
33879
- $nav = $('<xu-nav>');
33880
+ $nav = $('<xu-nav>'); //.attr('xu-ui-id', SESSION_ID);
33880
33881
  $container.append($nav);
33881
33882
  func.UI.component.init_xu_nav($container, $nav);
33882
33883
  }