From 26dcffc279057f80a579134e862085ba042c06c3 Mon Sep 17 00:00:00 2001 From: Gutts-n Date: Wed, 24 Jan 2024 11:03:08 -0300 Subject: [PATCH] Fixed problem presenting the download component in the first load of the bucket viewer --- .changeset/funny-horses-smash.md | 5 +++++ packages/components/src/components/BucketViewer.tsx | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/funny-horses-smash.md diff --git a/.changeset/funny-horses-smash.md b/.changeset/funny-horses-smash.md new file mode 100644 index 000000000..da03cd71d --- /dev/null +++ b/.changeset/funny-horses-smash.md @@ -0,0 +1,5 @@ +--- +'@portaljs/components': patch +--- + +Fixed problem presenting the download component in the first load of the bucket viewer diff --git a/packages/components/src/components/BucketViewer.tsx b/packages/components/src/components/BucketViewer.tsx index 600db1e1a..d46a1209e 100644 --- a/packages/components/src/components/BucketViewer.tsx +++ b/packages/components/src/components/BucketViewer.tsx @@ -47,7 +47,7 @@ export function BucketViewer({ downloadComponent = downloadComponent ?? <>; const [isLoading, setIsLoading] = useState(false); - const [showDownloadComponentOnLine, setShowDownloadComponentOnLine] = useState(0); + const [showDownloadComponentOnLine, setShowDownloadComponentOnLine] = useState(-1); const [currentPage, setCurrentPage] = useState(0); const [lastPage, setLastPage] = useState(0); const [bucketFiles, setBucketFiles] = useState([]);