Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions .changeset/clean-carrots-develop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hyperdx/app": patch
---

fix: Prevent dashboard infinite re-render
14 changes: 1 addition & 13 deletions packages/app/src/DBDashboardPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -650,11 +650,6 @@ function DBDashboardPage({ presetConfig }: { presetConfig?: Dashboard }) {
whereLanguage: SearchConditionLanguage;
}>({
defaultValues: {
granularity: 'auto',
where: '',
whereLanguage: 'lucene',
},
values: {
granularity: granularity ?? 'auto',
where: where ?? '',
whereLanguage: (whereLanguage as SearchConditionLanguage) ?? 'lucene',
Expand All @@ -672,17 +667,10 @@ function DBDashboardPage({ presetConfig }: { presetConfig?: Dashboard }) {
const [displayedTimeInputValue, setDisplayedTimeInputValue] =
useState('Past 1h');

const {
searchedTimeRange,
// displayedTimeInputValue,
// setDisplayedTimeInputValue,
onSearch,
onTimeRangeSelect,
} = useNewTimeQuery({
const { searchedTimeRange, onSearch, onTimeRangeSelect } = useNewTimeQuery({
initialDisplayValue: 'Past 1h',
initialTimeRange: defaultTimeRange,
setDisplayedTimeInputValue,
// showRelativeInterval: isLive,
});

const {
Expand Down
Loading