Repository navigation
v1.4.0 — Gridory
·
141 commits
to main
since this release
Minor release of Gridory, focused on the table: row selection, expandable rows, columns that hide by
priority, pinned and resizable columns, and help or custom content in the header. Everything is opt-in and
off by default: without the new props the table and the kanban look and behave as in 1.3.0, except for the
change listed under Visible changes.
English
Upgrade
npm install gridory@1.4.0Table
- Row selection.
rowSelection(RowSelectionConfig:selectedIds,defaultSelectedIds,onChange,
selectAllScope: "page" | "filtered"(SelectAllScope),isRowSelectable) adds the_selectcolumn.
Rows carrydata-selectedandaria-selected; checkboxes are.gdy-table-selectwith
.gdy-table-select-indicatoranddata-state. - Expandable rows.
renderExpandedRow,expandedRowIds,defaultExpandedRowIds,onExpandedChange
andcanExpandRowadd the_expandcolumn (.gdy-table-expand-toggle,.gdy-table-expand-chevron) and a
full-width detail (.gdy-table-expanded-row,-cell,-panelwithdata-state,-content,-body); the
open row carriesdata-expanded. The detail is not a row for paging, totals or selection. - Column visibility.
columnVisibility,responsiveColumnswith the column fieldshideableand
priority(data-hidden-by="priority"), andonColumnVisibilityChange(ColumnVisibilityDetails). - Pinned columns.
pin: "left" | "right"(ColumnPin) on a column withwidth, androwActions.pinned.
Cells carrydata-pinnedanddata-pinned-edge; the containerdata-has-pinned,data-scrolled-start,
data-scrolled-endanddata-pinning-suspended. - Resizable columns.
resizableColumns,columnWidths,defaultColumnWidthsandonColumnWidthsChange
(on release), withresizable,minWidth(64) andmaxWidthper column. The handle is
.gdy-table-resize-handle(mouse and keyboard, not on touch screens);data-resizedanddata-resizing. - Header help and content.
headerTooltip,headerTooltipPlacement(HeaderTooltipPlacement) and
headerContenton a column:.gdy-table-head-help,.gdy-table-head-tooltip,data-help-placement. - Printing. With
printMode, a columnprintValueprints its text (.gdy-table-print-value) and the
selection prints "Sí" / "No". - No toolbar.
features.toolbar: false. MissingRowIdError(selection or expandable rows withoutgetRowId) andPinnedColumnWidthError(pin
withoutwidth).ColumnPinandHeaderTooltipPlacementare exported fromgridory,gridory/tableand
gridory/kanban.- New
labelsand their default:selectRow"Seleccionar fila",
selectPageRows"Seleccionar las filas de la página",selectFilteredRows"Seleccionar todas las filas filtradas",printSelected"Sí",
printNotSelected"No",printSelectionHeader"Seleccionada",columnHelp"Ayuda sobre {column}",
expandRow"Mostrar detalle",resizeColumn"Cambiar el ancho de {column}",resizeColumnValue
"{width} px". - New tokens (
--gdy-table-):row-selected-bg,select-border,select-bg,select-checked-bg,
select-check-fg,select-focus-ring,head-help-fg,tooltip-bg,tooltip-fg,tooltip-z,
expanded-bg,expanded-padding,expand-focus-ring,expand-duration,pinned-bg,pinned-shadow,
pinned-z,pinned-corner-z,open-menu-z,resize-handle-color. - Variables the table writes, to read only:
--gdy-table-pin-offset,--gdy-table-visible-width,
--gdy-table-grid-width,--gdy-table-column-width,--gdy-table-column-print-width.
Fixes
- Printing with
printMode. Full-width rows (group, empty and loading) no longer count the actions
column, which does not print and left an empty strip at the right of a grouped table.
Visible changes
- A grouped table printed with
printModeand row actions: the columns now fill the page width.
Good to know
- An app that types a full
DataTableLabels(notPartial) must add the ten new keys. - A background or
opacityon a row (tr) does not reach its pinned cells: use--gdy-table-pinned-bgor
style the cells. - The new column fields are table only: the kanban accepts them in
ColumnDefinitionand ignores them. - With
responsiveColumns, widening a column can hide the lowest priority one on release, even that same
column.
Workarounds you can remove
| Workaround | Replaced by |
|---|---|
| Your own checkbox column and selected-ids state | rowSelection |
Removing columns from columns with a media query |
responsiveColumns and priority |
position: sticky on a column with nth-child |
pin |
A title or a portal for help in the header |
headerTooltip or headerContent |
| An extra row or a modal for a row detail | renderExpandedRow |
Your own resize handles or a hand-made colgroup |
resizableColumns |
See the table guide; every guide is
linked from the README.
Español
Actualizar
npm install gridory@1.4.0Tabla
- Selección de filas.
rowSelection(RowSelectionConfig:selectedIds,defaultSelectedIds,
onChange,selectAllScope: "page" | "filtered"(SelectAllScope),isRowSelectable) agrega la columna
_select. Las filas llevandata-selectedyaria-selected; las casillas son.gdy-table-selectcon
.gdy-table-select-indicatorydata-state. - Filas expandibles.
renderExpandedRow,expandedRowIds,defaultExpandedRowIds,onExpandedChange
ycanExpandRowagregan la columna_expand(.gdy-table-expand-toggle,.gdy-table-expand-chevron) y
un detalle de ancho completo (.gdy-table-expanded-row,-cell,-panelcondata-state,-content,
-body); la fila abierta llevadata-expanded. El detalle no cuenta como fila para la paginación, los
totales ni la selección. - Visibilidad de columnas.
columnVisibility,responsiveColumnscon los campos de columnahideable
ypriority(data-hidden-by="priority"), yonColumnVisibilityChange(ColumnVisibilityDetails). - Columnas fijas.
pin: "left" | "right"(ColumnPin) en una columna conwidth, y
rowActions.pinned. Las celdas llevandata-pinnedydata-pinned-edge; el contenedor
data-has-pinned,data-scrolled-start,data-scrolled-endydata-pinning-suspended. - Columnas redimensionables.
resizableColumns,columnWidths,defaultColumnWidthsy
onColumnWidthsChange(al soltar), conresizable,minWidth(64) ymaxWidthpor columna. La manija es
.gdy-table-resize-handle(mouse y teclado, no en pantallas táctiles);data-resizedydata-resizing. - Ayuda y contenido en el encabezado.
headerTooltip,headerTooltipPlacement
(HeaderTooltipPlacement) yheaderContenten una columna:.gdy-table-head-help,
.gdy-table-head-tooltip,data-help-placement. - Impresión. Con
printMode, elprintValuede una columna imprime su texto (.gdy-table-print-value)
y la selección imprime "Sí" / "No". - Sin barra.
features.toolbar: false. MissingRowIdError(selección o filas expandibles singetRowId) yPinnedColumnWidthError(pinsin
width).ColumnPinyHeaderTooltipPlacementse exportan desdegridory,gridory/tabley
gridory/kanban.labelsnuevos y su texto por defecto:selectRow"Seleccionar fila",
selectPageRows"Seleccionar las filas de la página",selectFilteredRows"Seleccionar todas las filas filtradas",printSelected"Sí",
printNotSelected"No",printSelectionHeader"Seleccionada",columnHelp"Ayuda sobre {columna}",
expandRow"Mostrar detalle",resizeColumn"Cambiar el ancho de {columna}",resizeColumnValue
"{ancho} px".- Tokens nuevos (
--gdy-table-):row-selected-bg,select-border,select-bg,select-checked-bg,
select-check-fg,select-focus-ring,head-help-fg,tooltip-bg,tooltip-fg,tooltip-z,
expanded-bg,expanded-padding,expand-focus-ring,expand-duration,pinned-bg,pinned-shadow,
pinned-z,pinned-corner-z,open-menu-z,resize-handle-color. - Variables que escribe la tabla, solo para leer:
--gdy-table-pin-offset,--gdy-table-visible-width,
--gdy-table-grid-width,--gdy-table-column-width,--gdy-table-column-print-width.
Arreglos
- Impresión con
printMode. Las filas de ancho completo (grupo, sin resultados y carga) ya no cuentan
la columna de acciones, que no se imprime y dejaba una franja vacía a la derecha de una tabla agrupada.
Cambios visibles
- Una tabla agrupada impresa con
printModey acciones por fila: las columnas ahora ocupan todo el ancho
de la página.
Para tener en cuenta
- Una app que tipa un
DataTableLabelscompleto (noPartial) tiene que sumar las diez claves nuevas. - Un fondo o una
opacityen una fila (tr) no llegan a sus celdas fijas: usa--gdy-table-pinned-bgo
aplica el estilo a las celdas. - Los campos de columna nuevos son solo de la tabla: el kanban los acepta en
ColumnDefinitiony los ignora. - Con
responsiveColumns, agrandar una columna puede ocultar al soltar la de menor prioridad, incluso esa
misma columna.
Parches que puedes quitar
| Parche | Lo reemplaza |
|---|---|
| Una columna de casillas propia y el estado de los ids seleccionados | rowSelection |
Quitar columnas de columns con un media query |
responsiveColumns y priority |
position: sticky en una columna con nth-child |
pin |
Un title o un portal para la ayuda del encabezado |
headerTooltip o headerContent |
| Una fila extra o un modal para el detalle de una fila | renderExpandedRow |
Manijas propias o un colgroup hecho a mano |
resizableColumns |
Ver la guía de la tabla; todas
las guías están enlazadas desde el README.