Skip to content

Définition API

TQuery64GetMetadataParams

typescript
export type TQuery64GetMetadataParams = {
  resourceName: string;
  context?: Record<string, unknown>;
};

TQuery64GetRowsParams

typescript
export type TQuery64GetRowsParams = {
  resourceName: string;
  agGridServerParams: IServerSideGetRowsRequest;
  columnsToDisplay: string[];
  shallReturnCount: boolean;
  quickSearch: string | null;
  context?: Record<string, unknown>;
};

TQuery64GridProps

typescript
export type TQuery64GridProps<T = TRecord> = {
  resourceName: string;
  getMetadata: (
    query64Params: TQuery64GetMetadataParams
  ) => Promise<TResourceColumnMetaData[]>;
  getRows: (
    query64Params: TQuery64GetRowsParams
  ) => Promise<TAggridGenericData<T>>;
  showRowCount?: boolean;
  aggridTheme?: any; // TODO
  aggridThemeMode?: "light" | "dark" | "dark-blue";
  gridStyle?: string;
  globalColumnSettings?: TGlobalColumnProps;
  hasManyColumnSettings?: THasManyColumnProps;
  actionColumnSettings?: TActionColumnProps;
  overloads?: TOverloadsProps[];
  additionals?: TAdditionalsProps[];
  initialGridParams?: {
    gridOptions?: GridOptions<T>;
    columnProfils?: TResourceColumnProfil[];
    filterModel?: IServerSideGetRowsRequest["filterModel"];
    sortModel?: IServerSideGetRowsRequest["sortModel"];
    rowGroupCols?: IServerSideGetRowsRequest["rowGroupCols"];
  };
  context?: Record<string, unknown>;
};

TQuery64GridExpose

typescript
export type TQuery64GridExpose<T = TRecord> = {
  /*
   * Réinitialise les filtres, tris, ordre et groupes de la grille et re-alimente la grille en données
   */
  resetGridParams: () => void;

  /*
   * Applique des filtres, tris, ordres et groupes à la grille et re-alimente la grille en données
   */
  updateGridParams: (
    columnProfils?: TResourceColumnProfil[],
    filterModel?: IServerSideGetRowsRequest["filterModel"],
    sortModel?: IServerSideGetRowsRequest["sortModel"],
    rowgroupCols?: IServerSideGetRowsRequest["rowGroupCols"]
  ) => void;

  /*
   *  Accès aux options de la grille
   */
  gridOptions: GridOptions<T>;

  /*
   * Accès à l'API de la grille
   */
  gridApi: GridApi<T> | undefined;

  /*
   * Dernier paramètre envoyer au serveur pour obtenir les lignes
   */
  getLastGetRowsParams: () => TQuery64GetRowsParams | null;

  /*
   * Référence de chargement de la grille
   */
  isLoadingSettingUpGrid: boolean;

  /*
  * Déclenche le filtre rapide (filtre sur toutes les colonnes)
  */
  triggerQuickFilter: (search: string) => void | Promise<void>;
};