gradio-pr-bot commited on
Commit
d101f92
·
verified ·
1 Parent(s): fe2cdf4

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. 6.12.0/gallery/Index.svelte +4 -6
6.12.0/gallery/Index.svelte CHANGED
@@ -37,12 +37,10 @@
37
 
38
  let fullscreen = $state(false);
39
 
40
- function handle_delete(
41
- event: CustomEvent<{ file: FileData; index: number }>
42
- ): void {
43
  if (!gradio.props.value) return;
44
- const { index } = event.detail;
45
- gradio.dispatch("delete", event.detail);
46
  gradio.props.value = gradio.props.value.filter((_, i) => i !== index);
47
  gradio.dispatch("change", gradio.props.value);
48
  }
@@ -309,7 +307,7 @@
309
  (btn) => typeof btn === "string" && btn === "fullscreen"
310
  )}
311
  buttons={gradio.props.buttons}
312
- on_custom_button_click={(id) => {
313
  gradio.dispatch("custom_button_click", { id });
314
  }}
315
  {fullscreen}
 
37
 
38
  let fullscreen = $state(false);
39
 
40
+ function handle_delete(data: { file: FileData; index: number }): void {
 
 
41
  if (!gradio.props.value) return;
42
+ const { index } = data;
43
+ gradio.dispatch("delete", data);
44
  gradio.props.value = gradio.props.value.filter((_, i) => i !== index);
45
  gradio.dispatch("change", gradio.props.value);
46
  }
 
307
  (btn) => typeof btn === "string" && btn === "fullscreen"
308
  )}
309
  buttons={gradio.props.buttons}
310
+ oncustom_button_click={(id) => {
311
  gradio.dispatch("custom_button_click", { id });
312
  }}
313
  {fullscreen}