mirror of
https://github.com/gradio-app/gradio.git
synced 2025-03-31 12:20:26 +08:00
Manage a null value update on Dataframe (#1580)
Co-authored-by: Ian Gonzalez <ian.gl@protonmail.com>
This commit is contained in:
parent
78af573990
commit
d0b521510d
@ -19,10 +19,12 @@
|
||||
export let label: string | null = null;
|
||||
|
||||
$: {
|
||||
if (!Array.isArray(value)) {
|
||||
if (value && !Array.isArray(value)) {
|
||||
if (Array.isArray(value.headers)) headers = value.headers;
|
||||
value =
|
||||
value.data.length === 0 ? [Array(headers.length).fill("")] : value.data;
|
||||
} else if (value === null) {
|
||||
value = [Array(headers.length).fill("")];
|
||||
} else {
|
||||
value = value;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user