Skip to content

Commit

Permalink
QueryBuilder: Remove the default row limit
Browse files Browse the repository at this point in the history
  • Loading branch information
insmac committed Jun 21, 2024
1 parent 73c9f39 commit 6085c64
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/queryBuilder/Limit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface LimitEditorProps {
onLimitChange: (limit: string) => void;
}
export const LimitEditor = (props: LimitEditorProps) => {
const [limit, setLimit] = useState(props.limit || '100');
const [limit, setLimit] = useState(props.limit);
const { label, tooltip } = selectors.components.QueryEditor.QueryBuilder.LIMIT;

return (
Expand Down
2 changes: 1 addition & 1 deletion src/components/queryBuilder/QueryBuilder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ export const QueryBuilder = (props: QueryBuilderProps) => {
fieldsList={getOrderByFields(builder, fieldsList)}
/>
<EditorRow>
<LimitEditor limit={builder.limit || 100} onLimitChange={onLimitChange} />
<LimitEditor limit={builder.limit} onLimitChange={onLimitChange} />
</EditorRow>
</EditorRows>
) : null;
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ export const defaultBuilderQuery: Omit<QuestDBBuilderQuery, 'refId'> = {
builderOptions: {
mode: BuilderMode.List,
fields: [],
limit: '100',
limit: '',
timeField: '',
},
format: Format.TABLE,
Expand Down

0 comments on commit 6085c64

Please sign in to comment.