Skip to content

Commit 83e34ed

Browse files
snacksbrojourdain
authored andcommitted
refactor(ListBrowser): Change prop showIcon->hideIcon
1 parent f4785f2 commit 83e34ed

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

trame_components/widgets/trame.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ class ListBrowser(HtmlElement):
282282
:param filter: Function to filter list
283283
:param path_separator: The icon to use for the slash between folders
284284
:param show_path_with_icon: Shows the path with the icon
285-
:param show_icon: Show the folder icon in the navigation bar
285+
:param hide_icon: Hide the folder icons in the navigation bar
286286
:param sticky_header: Freezes the navigation bar while scrolling
287287
:param path_icon:
288288
:param path_selected_icon:
@@ -296,7 +296,7 @@ def __init__(self, children=None, **kwargs):
296296
"path_icon",
297297
"path_selected_icon",
298298
"path_separator",
299-
"show_icon",
299+
"hide_icon",
300300
"show_path_with_icon",
301301
"filter_icon",
302302
"sticky_header",

vue-components/src/components/TrameListBrowser.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,15 @@ export default {
5757
props: {
5858
showPathWithIcon: {
5959
type: Boolean,
60-
default: false
60+
default: false,
6161
},
6262
pathIcon: {
6363
type: String,
6464
default: "mdi-folder-outline",
6565
},
66-
showIcon: {
66+
hideIcon: {
6767
type: Boolean,
68-
default: true
68+
default: false,
6969
},
7070
pathSelectedIcon: {
7171
type: String,
@@ -121,7 +121,7 @@ export default {
121121
return true;
122122
}
123123
const txt = [item.text.toLowerCase(), item.type.toLowerCase()].join(
124-
" "
124+
" ",
125125
);
126126
const tokens = filterValues.value;
127127
for (let i = 0; i < tokens.length; i++) {
@@ -173,7 +173,7 @@ export default {
173173
@mouseenter="activatePath(idx)"
174174
@mouseleave="deactivatePath">
175175
<v-icon
176-
v-if="showIcon"
176+
v-if="!hideIcon"
177177
class="mx-1"
178178
${ICON_ATTR}="activeFolderIndex === idx ? pathSelectedIcon : pathIcon"
179179
/>

0 commit comments

Comments
 (0)