Add user-selectable page size to MassData grid
Users can now choose how many records to display per page in the MassData grid (100, 1,000, 10,000, 100,000, or all). The backend and API client are updated to support nullable skip/take parameters, allowing "all" records to be fetched when desired. The pager and page count calculations are updated to reflect the selected page size, and the pager is hidden if only one page exists. Additional UI and CSS changes provide a combo box for page size selection. The API controller now treats take <= 0 as "no limit."
This commit is contained in:
@@ -27,7 +27,12 @@ public class MassDataController : ControllerBase
|
||||
[HttpGet]
|
||||
public async Task<ActionResult<IEnumerable<MassDataReadDto>>> GetAll([FromQuery] int? skip, [FromQuery] int? take, CancellationToken cancellationToken)
|
||||
{
|
||||
var resolvedTake = take is null or <= 0 ? 200 : take;
|
||||
int? resolvedTake = take;
|
||||
if (resolvedTake is <= 0)
|
||||
{
|
||||
resolvedTake = null;
|
||||
}
|
||||
|
||||
var result = await _mediator.Send(new GetAllMassDataQuery(skip, resolvedTake), cancellationToken);
|
||||
return Ok(result);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user