Class UpdateMiniCardsGrid

Updates the mini cards grid based on the specified rows and columns.

This method calculates the dimensions for the mini cards based on the provided rows and columns, as well as the container sizes. It also considers pagination settings and updates the grid sizes accordingly. The method can update either the default grid or an alternative grid based on the defal parameter.

The options for updating the mini cards grid.

The number of rows in the grid.

The number of columns in the grid.

Flag indicating whether to update the default grid or an alternative grid.

The actual number of rows in the grid.

Additional parameters needed for the function.

Function to get updated parameters.

Function to update the grid rows.

Function to update the grid columns.

Function to update the alternative grid rows.

Function to update the alternative grid columns.

Function to update the grid sizes.

Object containing grid width and height.

The direction of pagination ('horizontal' or 'vertical').

The height or width of pagination.

Flag indicating whether pagination is enabled.

Object containing container width and height.

The type of event ('chat', etc.).

  • A Promise that resolves after updating the mini cards grid.
const gridOptions = {
rows: 3,
cols: 4,
parameters: {
getUpdatedAllParams: () => updatedParams,
updateGridRows: (rows) => console.log(`Grid Rows Updated: ${rows}`),
updateGridCols: (cols) => console.log(`Grid Cols Updated: ${cols}`),
updateAltGridRows: (rows) => console.log(`Alt Grid Rows Updated: ${rows}`),
updateAltGridCols: (cols) => console.log(`Alt Grid Cols Updated: ${cols}`),
updateGridSizes: (sizes) => console.log(`Grid Sizes Updated: ${JSON.stringify(sizes)}`),
gridSizes: { gridWidth: 100, gridHeight: 100 },
paginationDirection: 'horizontal',
paginationHeightWidth: 50,
doPaginate: true,
componentSizes: { otherWidth: 800, otherHeight: 600 },
eventType: 'chat',
},
};

const miniCardGridService = new UpdateMiniCardsGrid();
miniCardGridService.updateMiniCardsGrid(gridOptions);

Constructors

Methods

Constructors

Methods