gradio-pr-bot commited on
Commit
2c3d48e
·
verified ·
1 Parent(s): 2b6729a

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. 6.4.0/json/shared/JSONNode.svelte +8 -2
6.4.0/json/shared/JSONNode.svelte CHANGED
@@ -1,5 +1,6 @@
1
  <script lang="ts">
2
  import { tick } from "svelte";
 
3
 
4
  let {
5
  value,
@@ -68,8 +69,13 @@
68
  }
69
 
70
  $effect(() => {
 
 
 
71
  if (is_root && root_element) {
72
- updateLineNumbers();
 
 
73
  }
74
  });
75
  </script>
@@ -134,7 +140,7 @@
134
  {#if is_collapsible(value)}
135
  <div class="children" class:hidden={collapsed}>
136
  {#each child_nodes as [subKey, subVal], i}
137
- <svelte:self
138
  value={subVal}
139
  depth={depth + 1}
140
  is_last_item={i === child_nodes.length - 1}
 
1
  <script lang="ts">
2
  import { tick } from "svelte";
3
+ import Self from "./JSONNode.svelte";
4
 
5
  let {
6
  value,
 
69
  }
70
 
71
  $effect(() => {
72
+ value;
73
+ collapsed;
74
+
75
  if (is_root && root_element) {
76
+ tick().then(() => {
77
+ updateLineNumbers();
78
+ });
79
  }
80
  });
81
  </script>
 
140
  {#if is_collapsible(value)}
141
  <div class="children" class:hidden={collapsed}>
142
  {#each child_nodes as [subKey, subVal], i}
143
+ <Self
144
  value={subVal}
145
  depth={depth + 1}
146
  is_last_item={i === child_nodes.length - 1}