Skip to content

Commit

Permalink
Fix hide/unhide entries
Browse files Browse the repository at this point in the history
  • Loading branch information
barshathakuri authored and AdityaKhatri committed Nov 25, 2024
1 parent abf2d1d commit 8cf80ff
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions app/components/LeftPaneEntries/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ const LEAD_PREVIEW = gql`
$page: Int,
$pageSize: Int,
$excludeAttachmentIds: [ID!],
$excludeLeadWithNoEntries: Boolean,
) {
project(id: $projectId) {
id
Expand All @@ -103,6 +104,7 @@ const LEAD_PREVIEW = gql`
page: $page,
pageSize: $pageSize,
excludeAttachmentIds: $excludeAttachmentIds,
excludeLeadWithNoEntries: $excludeLeadWithNoEntries,
) {
results {
id
Expand Down Expand Up @@ -292,6 +294,7 @@ function LeftPaneEntries(props: Props) {
excludeAttachmentIds: attachmentsWithEntriesHidden
? leadAttachmentIdsWithEntries
: [],
excludeLeadWithNoEntries: !attachmentsWithEntriesHidden,
}) : undefined),
[
leadId,
Expand Down Expand Up @@ -899,14 +902,12 @@ function LeftPaneEntries(props: Props) {
activeClassName={styles.visualsTab}
retainMount="lazy"
>
{isDefined(leadPreviewCount) && (leadPreviewCount > 0) && (
<Switch
name="hide attachments"
label="Hide Created entries"
value={attachmentsWithEntriesHidden}
onChange={setAttachmentsWithEntriesHidden}
/>
)}
<Switch
name="hide attachments"
label="Hide Created entries"
value={attachmentsWithEntriesHidden}
onChange={setAttachmentsWithEntriesHidden}
/>
<ListView
spacing="comfortable"
direction="vertical"
Expand Down

0 comments on commit 8cf80ff

Please sign in to comment.