Skip to content

fix: hide data queried dropdown when empty#1604

Open
reverb256 wants to merge 1 commit intoPostHog:mainfrom
reverb256:fix/1574-hide-empty-data-queried
Open

fix: hide data queried dropdown when empty#1604
reverb256 wants to merge 1 commit intoPostHog:mainfrom
reverb256:fix/1574-hide-empty-data-queried

Conversation

@reverb256
Copy link
Copy Markdown
Contributor

Problem

Fixes #1574

The "Data queried" collapsible button shows up even when there is no data queried, because whitespace-only or empty strings pass the falsy check.

Solution

Changed if (!text) return null to if (!text.trim()) return null in DataQueriedCollapsible. This hides the dropdown when the content is empty, whitespace-only, or undefined.

Files Changed

  • apps/code/src/renderer/features/inbox/components/detail/SignalCard.tsx — 1 line changed

The DataQueriedCollapsible component would show the 'Data queried'
button even for whitespace-only content. Now trims before checking.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hide "data queried" when there was no data queried

1 participant