UI: Hide pageSizeOption on persistent table widget
This commit is contained in:
parent
12dcbf0e5e
commit
33508f558e
@ -68,6 +68,7 @@ import {
|
||||
} from '@home/components/widget/lib/rpc/persistent-filter-panel.component';
|
||||
import { PersistentAddDialogComponent } from '@home/components/widget/lib/rpc/persistent-add-dialog.component';
|
||||
import { ResizeObserver } from '@juggle/resize-observer';
|
||||
import { hidePageSizePixelValue } from '@shared/models/constants';
|
||||
|
||||
interface PersistentTableWidgetSettings extends TableWidgetSettings {
|
||||
defaultSortOrder: string;
|
||||
@ -149,7 +150,7 @@ export class PersistentTableComponent extends PageComponent implements OnInit {
|
||||
this.ctx.updateWidgetParams();
|
||||
if (this.displayPagination) {
|
||||
this.widgetResize$ = new ResizeObserver(() => {
|
||||
const showHidePageSize = this.ctx.$container[0].offsetWidth < 500;
|
||||
const showHidePageSize = this.persistentWidgetContainerRef.nativeElement.offsetWidth < hidePageSizePixelValue;
|
||||
if (showHidePageSize !== this.hidePageSize) {
|
||||
this.hidePageSize = showHidePageSize;
|
||||
this.ctx.detectChanges();
|
||||
|
||||
@ -241,6 +241,7 @@ export const contentTypesMap = new Map<ContentType, ContentTypeData>(
|
||||
]
|
||||
);
|
||||
|
||||
export const hidePageSizePixelValue = 550;
|
||||
export const customTranslationsPrefix = 'custom.';
|
||||
export const i18nPrefix = 'i18n';
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user