Skip to content
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

WCMS-21331: Fix Cache buster causing error #223

Merged
merged 1 commit into from
Jun 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/components/DatatableHeader/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const DataTableHeader = ({ resource, downloadURL, unfilteredDownloadURL, jsonUrl
</div>
<div className="dc-c-resource-header--buttons ds-l-col--12 ds-u-display--flex ds-u-flex-wrap--wrap ds-u-justify-content--end ds-u-padding-x--0">
<div className="ds-l-col--12 ds-l-sm-col--auto ds-u-padding-x--0 ds-u-margin-bottom--2">
{conditions.length ? (
{conditions && conditions.length ? (
<Tooltip
onOpen={() => {
navigator.clipboard.writeText(window.location.href);
Expand All @@ -31,7 +31,7 @@ const DataTableHeader = ({ resource, downloadURL, unfilteredDownloadURL, jsonUrl
dialog
ariaLabel="Copy link to filtered data"
title="Link copied to clipboard"
aria-disabled={conditions.length === 0}
aria-disabled={!conditions || conditions.length === 0}
>
<span className="ds-u-font-weight--semibold ds-u-margin-left--1 ds-u-padding--0">
<i className="fas fa-copy"></i> Copy link to filtered data
Expand All @@ -51,7 +51,7 @@ const DataTableHeader = ({ resource, downloadURL, unfilteredDownloadURL, jsonUrl
<Button
className="ds-u-text-align--center ds-u-font-weight--normal ds-u-font-size--base ds-u-margin-right--1 ds-u-display--inline-block ds-l-col--12"
href={downloadURL}
aria-disabled={conditions.length === 0}
aria-disabled={!conditions || conditions.length === 0}
>
<span className="ds-u-font-weight--semibold ds-u-margin-left--1 ds-u-padding--0">
<i className="fas fa-file-csv"></i> Download filtered data (CSV)
Expand Down