Skip to content

Commit

Permalink
Fix hide/unhide entries for ocr items
Browse files Browse the repository at this point in the history
  • Loading branch information
barshathakuri authored and AdityaKhatri committed Dec 5, 2024
1 parent abf2d1d commit b093189
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!],
$excludeLeadattachmentCreatedEntries: Boolean,
) {
project(id: $projectId) {
id
Expand All @@ -103,6 +104,7 @@ const LEAD_PREVIEW = gql`
page: $page,
pageSize: $pageSize,
excludeAttachmentIds: $excludeAttachmentIds,
excludeLeadattachmentCreatedEntries: $excludeLeadattachmentCreatedEntries,
) {
results {
id
Expand Down Expand Up @@ -292,6 +294,7 @@ function LeftPaneEntries(props: Props) {
excludeAttachmentIds: attachmentsWithEntriesHidden
? leadAttachmentIdsWithEntries
: [],
excludeLeadattachmentCreatedEntries: !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 b093189

Please sign in to comment.