Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support column/row deletion in gr.DataFrame #10420

Merged
merged 21 commits into from
Jan 29, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
changes
  • Loading branch information
abidlabs committed Jan 28, 2025
commit cdf49a19f4805d5185d8c7823660aa660ed0721c
46 changes: 40 additions & 6 deletions js/dataframe/shared/CellMenuIcons.svelte
Original file line number Diff line number Diff line change
@@ -13,7 +13,13 @@
stroke-width="2"
fill="none"
/>
<path d="M12 12H19M16 8L19 12L16 16" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" />
<path
d="M12 12H19M16 8L19 12L16 16"
stroke="currentColor"
stroke-width="2"
fill="none"
stroke-linecap="round"
/>
</svg>
{:else if icon == "add-column-left"}
<svg viewBox="0 0 24 24" width="16" height="16">
@@ -26,7 +32,13 @@
stroke-width="2"
fill="none"
/>
<path d="M12 12H5M8 8L5 12L8 16" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" />
<path
d="M12 12H5M8 8L5 12L8 16"
stroke="currentColor"
stroke-width="2"
fill="none"
stroke-linecap="round"
/>
</svg>
{:else if icon == "add-row-above"}
<svg viewBox="0 0 24 24" width="16" height="16">
@@ -38,7 +50,13 @@
stroke="currentColor"
stroke-width="2"
/>
<path d="M12 12V5M8 8L12 5L16 8" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" />
<path
d="M12 12V5M8 8L12 5L16 8"
stroke="currentColor"
stroke-width="2"
fill="none"
stroke-linecap="round"
/>
</svg>
{:else if icon == "add-row-below"}
<svg viewBox="0 0 24 24" width="16" height="16">
@@ -50,7 +68,13 @@
stroke="currentColor"
stroke-width="2"
/>
<path d="M12 12V19M8 16L12 19L16 16" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" />
<path
d="M12 12V19M8 16L12 19L16 16"
stroke="currentColor"
stroke-width="2"
fill="none"
stroke-linecap="round"
/>
</svg>
{:else if icon == "delete-row"}
<svg viewBox="0 0 24 24" width="16" height="16">
@@ -62,7 +86,12 @@
stroke="currentColor"
stroke-width="2"
/>
<path d="M8 7L16 17M16 7L8 17" stroke="currentColor" stroke-width="2" stroke-linecap="round" />
<path
d="M8 7L16 17M16 7L8 17"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
/>
</svg>
{:else if icon == "delete-column"}
<svg viewBox="0 0 24 24" width="16" height="16">
@@ -74,6 +103,11 @@
stroke="currentColor"
stroke-width="2"
/>
<path d="M7 8L17 16M17 8L7 16" stroke="currentColor" stroke-width="2" stroke-linecap="round" />
<path
d="M7 8L17 16M17 8L7 16"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
/>
</svg>
{/if}
6 changes: 1 addition & 5 deletions js/dataframe/shared/Table.svelte
Original file line number Diff line number Diff line change
@@ -120,11 +120,7 @@
id: string;
}[][] {
const data_row_length = _values.length;
return Array(
row_count[1] === "fixed"
? row_count[0]
: data_row_length
)
return Array(row_count[1] === "fixed" ? row_count[0] : data_row_length)
.fill(0)
.map((_, i) =>
Array(
Loading