gradio/ui/packages/app/src/components/DataFrame/DataFrame.svelte

14 lines
442 B
Svelte
Raw Normal View History

<script lang="ts">
2022-03-08 21:35:42 +08:00
import { Table } from "@gradio/table";
export let headers: Array<string> = [];
2022-03-08 21:35:42 +08:00
export let value: Array<Array<string | number>> = [["", "", ""]];
2022-03-29 21:10:35 +08:00
export let default_value: Array<Array<string | number>> = [["", "", ""]];
export let style: string = "";
2022-03-08 21:35:42 +08:00
export let is_static: boolean;
2022-03-29 21:10:35 +08:00
if (default_value) value = default_value;
</script>
<Table bind:values={value} {headers} {style} on:change editable={!is_static} />