From 3f33fb0703ee2afb0f7c1208dd6362279fc978a4 Mon Sep 17 00:00:00 2001 From: "J.C. Zhong" <exzjc@hotmail.com> Date: Fri, 22 Nov 2024 23:15:33 +0000 Subject: [PATCH] add comment --- .../webapp/components/QueryRunButton/QueryRunButton.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/querybook/webapp/components/QueryRunButton/QueryRunButton.tsx b/querybook/webapp/components/QueryRunButton/QueryRunButton.tsx index 146edfa28..59a670448 100644 --- a/querybook/webapp/components/QueryRunButton/QueryRunButton.tsx +++ b/querybook/webapp/components/QueryRunButton/QueryRunButton.tsx @@ -303,10 +303,8 @@ const TableSamplingSelector: React.FC<{ ); React.useEffect(() => { - if ( - sampleRate === undefined || - !sampleRateOptions.some((option) => option.value === sampleRate) - ) { + // If it is a new cell without the sample rate selected, use the default sample rate from user settings + if (sampleRate === undefined) { setSampleRate(parseFloat(userDefaultTableSampleRate)); } }, [