Skip to content

Commit

Permalink
adds property not to show hidden files
Browse files Browse the repository at this point in the history
  • Loading branch information
jerrywu committed Jun 7, 2022
1 parent 4a219af commit 1226518
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sandpack-react/src/components/FileExplorer/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ export const fromPropsToModules = ({
const hasVisibleFilesOption = visibleFiles.length > 0;

/**
* When visibleFiles are set, the hidden
* and active flags on the files prop are ignored.
* When visibleFiles or activeFile are set, the hidden and active flags on the files prop are ignored.
* @see: https://sandpack.codesandbox.io/docs/getting-started/custom-content#visiblefiles-and-activefile
*/
const filterByHiddenProperty = autoHiddenFiles && !hasVisibleFilesOption;
Expand Down

0 comments on commit 1226518

Please sign in to comment.