Add limit on view widget (#21718)

<img width="1345" height="463" alt="image"
src="https://github.com/user-attachments/assets/a5d9ac2f-6375-4956-895d-3675aa9bebc1"
/>


<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/twentyhq/twenty/pull/21718?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->

---------

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
This commit is contained in:
martmull
2026-06-17 16:43:31 +02:00
committed by GitHub
parent 60b559a659
commit 102c530d0f
18 changed files with 121 additions and 5 deletions
@@ -1,6 +1,13 @@
import { Field, ObjectType } from '@nestjs/graphql';
import { Field, Int, ObjectType } from '@nestjs/graphql';
import { IsIn, IsNotEmpty, IsOptional, IsUUID } from 'class-validator';
import {
IsIn,
IsInt,
IsNotEmpty,
IsOptional,
IsUUID,
Min,
} from 'class-validator';
import { type RecordTableConfiguration } from 'twenty-shared/types';
import { WidgetConfigurationType } from 'src/engine/metadata-modules/page-layout-widget/enums/widget-configuration-type.type';
@@ -16,4 +23,10 @@ export class RecordTableConfigurationDTO implements RecordTableConfiguration {
@IsOptional()
@IsUUID()
viewId?: string;
@Field(() => Int, { nullable: true })
@IsOptional()
@IsInt()
@Min(1)
recordLimit?: number;
}