@bmsuisse/datagrid 0.34.0 → 0.34.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4001,6 +4001,7 @@ function DataGrid({
|
|
|
4001
4001
|
const filterable = isFilterable(column) && column.filterDisplay !== "row";
|
|
4002
4002
|
const cellProps = leafHeaderCellPropsByColumn.get(column.id);
|
|
4003
4003
|
const headerContent = column.renderHeader ? column.renderHeader(column) : column.header;
|
|
4004
|
+
const headerLabelId = `${header.id}-label`;
|
|
4004
4005
|
return /* @__PURE__ */ jsxs20(
|
|
4005
4006
|
"th",
|
|
4006
4007
|
{
|
|
@@ -4008,13 +4009,14 @@ function DataGrid({
|
|
|
4008
4009
|
style: cellProps?.style,
|
|
4009
4010
|
className: cellProps?.className,
|
|
4010
4011
|
"aria-sort": sortable ? sortDirToAriaSort(sortEntry?.dir) : void 0,
|
|
4011
|
-
"aria-
|
|
4012
|
+
"aria-labelledby": headerLabelId,
|
|
4012
4013
|
children: [
|
|
4013
4014
|
/* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-1", children: [
|
|
4014
4015
|
sortable ? /* @__PURE__ */ jsxs20(
|
|
4015
4016
|
"button",
|
|
4016
4017
|
{
|
|
4017
4018
|
type: "button",
|
|
4019
|
+
id: headerLabelId,
|
|
4018
4020
|
"data-testid": `sort-button-${column.id}`,
|
|
4019
4021
|
className: "flex items-center gap-1 rounded-sm px-1 hover:bg-accent hover:text-accent-foreground",
|
|
4020
4022
|
onClick: (event) => toggleSort(column.id, enableMultiSort && event.shiftKey, column.sortDescFirst === true),
|
|
@@ -4030,7 +4032,7 @@ function DataGrid({
|
|
|
4030
4032
|
// silently breaking any interactive content a column's own `renderHeader`
|
|
4031
4033
|
// embeds directly (bare filter inputs, "select/reject all" buttons) —
|
|
4032
4034
|
// clicks never reach them at all, even though nothing looks wrong visually.
|
|
4033
|
-
/* @__PURE__ */ jsx33("div", { className: "flex items-center gap-1 px-1", children: headerContent })
|
|
4035
|
+
/* @__PURE__ */ jsx33("div", { id: headerLabelId, className: "flex items-center gap-1 px-1", children: headerContent })
|
|
4034
4036
|
),
|
|
4035
4037
|
filterable && /* @__PURE__ */ jsxs20(Popover, { children: [
|
|
4036
4038
|
/* @__PURE__ */ jsx33(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx33(
|