Skip to content

Commit

Permalink
fix(file_path): Changed _update_path() parameters and parsing dict in…
Browse files Browse the repository at this point in the history
…side the function (#9)
  • Loading branch information
anshakeel authored Feb 17, 2023
1 parent 6f536ad commit d540974
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pv_visualizer/html/file_browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def __init__(self, resolver, on_load_file=None, namespace="file_browser", **kwar
super().__init__(
list=(self._key_listing, []),
path=(self._key_path, []),
click=(self._update_path, "[]", "$event"),
click=(self._update_path, "[$event]"),
**kwargs,
)
# "path_icon",
Expand Down Expand Up @@ -228,7 +228,9 @@ def _update_listing(self):

self.server.state[self._key_listing] = listing

def _update_path(self, type, value):
def _update_path(self, fileinfo):
type = fileinfo["type"]
value = fileinfo["value"]
if type == "Directory":
current_path = self.server.state[self._key_path]
new_path = []
Expand Down

0 comments on commit d540974

Please sign in to comment.