fix: Increases the options limit for Annotation Layers (#23613)

This commit is contained in:
Michael S. Molina 2023-04-06 13:04:18 -03:00 committed by GitHub
parent 0b01c934f4
commit 739adcb93c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -47,6 +47,7 @@ import {
import PopoverSection from 'src/components/PopoverSection';
import ControlHeader from 'src/explore/components/ControlHeader';
import { EmptyStateSmall } from 'src/components/EmptyState';
import { FILTER_OPTIONS_LIMIT } from 'src/explore/constants';
const AUTOMATIC_COLOR = '';
@ -301,8 +302,12 @@ class AnnotationLayer extends React.PureComponent {
fetchOptions(annotationType, sourceType, isLoadingOptions) {
if (isLoadingOptions) {
if (sourceType === ANNOTATION_SOURCE_TYPES.NATIVE) {
const queryParams = rison.encode({
page: 0,
page_size: FILTER_OPTIONS_LIMIT,
});
SupersetClient.get({
endpoint: '/api/v1/annotation_layer/',
endpoint: `/api/v1/annotation_layer/?q=${queryParams}`,
}).then(({ json }) => {
const layers = json
? json.result.map(layer => ({
@ -327,7 +332,7 @@ class AnnotationLayer extends React.PureComponent {
order_column: 'slice_name',
order_direction: 'asc',
page: 0,
page_size: 25,
page_size: FILTER_OPTIONS_LIMIT,
});
SupersetClient.get({
endpoint: `/api/v1/chart/?q=${queryParams}`,