Skip to content

Commit

Permalink
make current bindable
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaitanLyss committed Sep 9, 2024
1 parent 06a1c23 commit 9162e3b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@selenite/commons",
"version": "0.30.5",
"version": "0.30.6",
"repository": "github:ShaitanLyss/selenite-commons",
"license": "MIT",
"keywords": [
Expand Down
3 changes: 2 additions & 1 deletion src/lib/components/Browser.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
interface Props extends HTMLAttributes<HTMLElement> {
items?: T[];
pathKey?: ArrayKeys<T>;
current?: string[];
Item?: Snippet<[Partial<T>]>;
Folder?: Snippet<[T]>;
solid?: boolean;
Expand Down Expand Up @@ -52,6 +53,7 @@
searchBar = true,
displayPath: pathDisplay = true,
items = $bindable([]),
current = $bindable<string[]>([]),
pathKey = 'path' as ArrayKeys<T>,
solid = false,
cols = 4,
Expand Down Expand Up @@ -95,7 +97,6 @@
return res;
});
let current: string[] = $state([]);
const currentStr = $derived(current.join('/'));
function goBack() {
Expand Down

0 comments on commit 9162e3b

Please sign in to comment.