🐛(react) make datagrid select column visible
Due to a previous commit f398e51db3 the selection
column was invisible, this way caused by having table-layout: fixed and
width: 0 on the select column at the same time.
This commit is contained in:
committed by
Jean-Baptiste PENRATH
parent
dbd5f05652
commit
1514e4f0b3
5
.changeset/fair-melons-exercise.md
Normal file
5
.changeset/fair-melons-exercise.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@openfun/cunningham-react": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
make datagrid select column visible
|
||||||
@@ -84,12 +84,6 @@
|
|||||||
tbody {
|
tbody {
|
||||||
background-color: var(--c--theme--colors--greyscale-000);
|
background-color: var(--c--theme--colors--greyscale-000);
|
||||||
}
|
}
|
||||||
|
|
||||||
.c__datagrid__row__cell--select, .c__datagrid__header--select {
|
|
||||||
width: 0;
|
|
||||||
padding-right: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -199,8 +199,8 @@ export const DataGrid = <T extends Row>({
|
|||||||
<tr key={headerGroup.id}>
|
<tr key={headerGroup.id}>
|
||||||
{headerGroup.headers.map((header, i) => {
|
{headerGroup.headers.map((header, i) => {
|
||||||
const style: CSSProperties = {};
|
const style: CSSProperties = {};
|
||||||
const column = columns[i];
|
const column = headlessColumns[i];
|
||||||
if (column && typeof column.size === "number") {
|
if (column && typeof column.size !== "undefined") {
|
||||||
style.width = `${column.size}px`;
|
style.width = `${column.size}px`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ export const useHeadlessColumns = <T extends Row>({
|
|||||||
headlessColumns = [
|
headlessColumns = [
|
||||||
columnHelper.display({
|
columnHelper.display({
|
||||||
id: HEADER_ID_SELECT,
|
id: HEADER_ID_SELECT,
|
||||||
|
size: 34,
|
||||||
header: () => null,
|
header: () => null,
|
||||||
cell: ({ row }) => (
|
cell: ({ row }) => (
|
||||||
<Checkbox
|
<Checkbox
|
||||||
|
|||||||
Reference in New Issue
Block a user