Skip to content

Commit

Permalink
fix svelte warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
n-peugnet committed Dec 9, 2023
1 parent baf44f0 commit b98938b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/view/FileList.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@
<FileListCell
{fs}
{cell}
{row}
onClickMenu={() => (menuInode = row.inode)}
onClickRename={() => {
renameValue = menuInode.basename;
Expand Down
7 changes: 4 additions & 3 deletions src/view/FileListCell.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@
OverflowMenu,
OverflowMenuItem,
} from "carbon-components-svelte";
import type { DataTableCell } from "carbon-components-svelte/types/DataTable/DataTable.svelte";
import type { DataTableCell, DataTableRow } from "carbon-components-svelte/types/DataTable/DataTable.svelte";
import type { FileSystem } from "../model/FileSystem";
export let fs: FileSystem;
export let cell: DataTableCell;
export let row: DataTableRow;
export let onClickMenu: (e?: Event) => void;
export let onClickRename: (e?: Event) => void;
export let onClickDetails: (e?: Event) => void;
Expand Down Expand Up @@ -61,7 +62,7 @@
{cell.value.getIconChar()}
</span>
{#if cell.value instanceof File}
<span on:click|stopPropagation>
<span on:click|stopPropagation on:keypress|stopPropagation>
<Link
inline
href={fs.getFileDownloadLink(cell.value.path)}
Expand All @@ -78,7 +79,7 @@
{:else}
<div>
{#key $locale}
{cell.display ? cell.display(cell.value) : cell.value}
{cell.display ? cell.display(cell.value, row) : cell.value}
{/key}
</div>
{/if}
Expand Down

0 comments on commit b98938b

Please sign in to comment.