-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature | add support of custom no result message #14
Conversation
@@ -23,6 +30,7 @@ export const FileTree = ({ list, loading, getFilesCb, onSelect }: FileTreeInterf | |||
} | |||
}; | |||
|
|||
console.log('emptyMessage', emptyMessage); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Slipped or intended?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i didnt pushed my last commit ):
@@ -59,6 +59,7 @@ FileTreeWithFiles.args = { | |||
href: '/' | |||
} | |||
], | |||
emptyMessage: 'empty message ', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can write a real message like "no files here" no?
@@ -29,7 +30,8 @@ export function FileTreeItem({ | |||
getFilesCb, | |||
setSelected, | |||
type, | |||
href | |||
href, | |||
emptyMessage, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird formatting no?
if (emptyMessage) { | ||
return <Box ml={2} p={1}>{emptyMessage}</Box>; | ||
} | ||
// fallback | ||
return <Box p={1}>This file is empty</Box>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be "This directory is empty"
for empty or nonrelevant files today we render the same message of "no files".
now, we support custom message for empty children result but we can differentiate when there's no files and no relevant dir or bucket and existing files but nothing relevant to display
case 1: 0 files display "no files"
case 2: some files but not dir or bucket so we would display a custom message about it.