Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Increases the options limit for Annotation Layers #23613

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '';

Expand Down Expand Up @@ -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 => ({
Expand All @@ -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}`,
Expand Down