Update query pagination to be stored in fields
This commit is contained in:
parent
af00ed88ae
commit
882067056c
|
@ -215,8 +215,8 @@
|
|||
if (query && !query.fields.bodyType) {
|
||||
query.fields.bodyType = "none"
|
||||
}
|
||||
if (query && !query.pagination) {
|
||||
query.pagination = {}
|
||||
if (query && !query.fields.pagination) {
|
||||
query.fields.pagination = {}
|
||||
}
|
||||
dynamicVariables = restUtils.variablesToObject(datasource)
|
||||
})
|
||||
|
@ -296,34 +296,34 @@
|
|||
<div class="pagination">
|
||||
<Select
|
||||
label="Pagination type"
|
||||
bind:value={query.pagination.type}
|
||||
bind:value={query.fields.pagination.type}
|
||||
options={PaginationTypes}
|
||||
placeholder="None"
|
||||
/>
|
||||
{#if query.pagination.type}
|
||||
{#if query.fields.pagination.type}
|
||||
<Select
|
||||
label="Pagination parameters location"
|
||||
bind:value={query.pagination.location}
|
||||
bind:value={query.fields.pagination.location}
|
||||
options={PaginationLocations}
|
||||
placeholer="Choose where to send pagination parameters"
|
||||
/>
|
||||
<Input
|
||||
label={query.pagination.type === "page"
|
||||
label={query.fields.pagination.type === "page"
|
||||
? "Page number parameter"
|
||||
: "Request cursor parameter"}
|
||||
bind:value={query.pagination.pageParam}
|
||||
bind:value={query.fields.pagination.pageParam}
|
||||
/>
|
||||
<Input
|
||||
label={query.pagination.type === "page"
|
||||
label={query.fields.pagination.type === "page"
|
||||
? "Page size parameter"
|
||||
: "Request limit parameter"}
|
||||
bind:value={query.pagination.sizeParam}
|
||||
bind:value={query.fields.pagination.sizeParam}
|
||||
info="asdasd"
|
||||
/>
|
||||
{#if query.pagination.type === "cursor"}
|
||||
{#if query.fields.pagination.type === "cursor"}
|
||||
<Input
|
||||
label="Response body parameter for cursor"
|
||||
bind:value={query.pagination.responseParam}
|
||||
bind:value={query.fields.pagination.responseParam}
|
||||
/>
|
||||
{/if}
|
||||
{/if}
|
||||
|
|
Loading…
Reference in New Issue