Skip to content

Commit

Permalink
refactor(ListBrowser): Change prop showIcon->hideIcon
Browse files Browse the repository at this point in the history
  • Loading branch information
snacksbro authored and jourdain committed Aug 5, 2024
1 parent f4785f2 commit 83e34ed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions trame_components/widgets/trame.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ class ListBrowser(HtmlElement):
:param filter: Function to filter list
:param path_separator: The icon to use for the slash between folders
:param show_path_with_icon: Shows the path with the icon
:param show_icon: Show the folder icon in the navigation bar
:param hide_icon: Hide the folder icons in the navigation bar
:param sticky_header: Freezes the navigation bar while scrolling
:param path_icon:
:param path_selected_icon:
Expand All @@ -296,7 +296,7 @@ def __init__(self, children=None, **kwargs):
"path_icon",
"path_selected_icon",
"path_separator",
"show_icon",
"hide_icon",
"show_path_with_icon",
"filter_icon",
"sticky_header",
Expand Down
10 changes: 5 additions & 5 deletions vue-components/src/components/TrameListBrowser.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ export default {
props: {
showPathWithIcon: {
type: Boolean,
default: false
default: false,
},
pathIcon: {
type: String,
default: "mdi-folder-outline",
},
showIcon: {
hideIcon: {
type: Boolean,
default: true
default: false,
},
pathSelectedIcon: {
type: String,
Expand Down Expand Up @@ -121,7 +121,7 @@ export default {
return true;
}
const txt = [item.text.toLowerCase(), item.type.toLowerCase()].join(
" "
" ",
);
const tokens = filterValues.value;
for (let i = 0; i < tokens.length; i++) {
Expand Down Expand Up @@ -173,7 +173,7 @@ export default {
@mouseenter="activatePath(idx)"
@mouseleave="deactivatePath">
<v-icon
v-if="showIcon"
v-if="!hideIcon"
class="mx-1"
${ICON_ATTR}="activeFolderIndex === idx ? pathSelectedIcon : pathIcon"
/>
Expand Down

0 comments on commit 83e34ed

Please sign in to comment.