grep-components 1.19.0 → 1.20.0-grepf-1803.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.
|
@@ -36,6 +36,7 @@ export interface GrepTableProps<T> extends Pick<TableProps, 'size' | 'stickyHead
|
|
|
36
36
|
onContextIdChanged?: (row: T) => void;
|
|
37
37
|
onSortBy?: (col: TableColumn<T>) => any;
|
|
38
38
|
caption?: React.ReactNode;
|
|
39
|
+
menuButtonLabel?: string;
|
|
39
40
|
/**
|
|
40
41
|
* @deprecated No longer in use.
|
|
41
42
|
*/
|
|
@@ -64,6 +65,6 @@ export declare const useStyles: (params: StyleProps, styleOverrides?: {
|
|
|
64
65
|
* @todo enhance page handling
|
|
65
66
|
*
|
|
66
67
|
*/
|
|
67
|
-
export declare const GrepTable: <T>({ placeholderText, dropdownItems, isRowDisabled, pagination, outlined, columns, header, data, onSelectedRowChange, sortBy, sortDirection, onSortBy, onRowClick, size, caption, stickyHeader, padding, disableSelectOnClick, ...props }: GrepTableProps<T>) => JSX.Element;
|
|
68
|
+
export declare const GrepTable: <T>({ placeholderText, dropdownItems, isRowDisabled, pagination, outlined, columns, header, data, onSelectedRowChange, sortBy, sortDirection, onSortBy, onRowClick, size, caption, stickyHeader, padding, disableSelectOnClick, menuButtonLabel, ...props }: GrepTableProps<T>) => JSX.Element;
|
|
68
69
|
export { GrepTableRow };
|
|
69
70
|
export default GrepTable;
|
package/dist/index.js
CHANGED
|
@@ -3546,7 +3546,7 @@ var getElementIndex = function (el) {
|
|
|
3546
3546
|
*
|
|
3547
3547
|
*/
|
|
3548
3548
|
var GrepTable = function (_a) {
|
|
3549
|
-
var placeholderText = _a.placeholderText, dropdownItems = _a.dropdownItems, isRowDisabled = _a.isRowDisabled, pagination = _a.pagination, outlined = _a.outlined, columns = _a.columns, header = _a.header, data = _a.data, onSelectedRowChange = _a.onSelectedRowChange, sortBy = _a.sortBy, sortDirection = _a.sortDirection, onSortBy = _a.onSortBy, onRowClick = _a.onRowClick, size = _a.size, caption = _a.caption, stickyHeader = _a.stickyHeader, padding = _a.padding, _b = _a.disableSelectOnClick, disableSelectOnClick = _b === void 0 ? false : _b, props = __rest$1(_a, ["placeholderText", "dropdownItems", "isRowDisabled", "pagination", "outlined", "columns", "header", "data", "onSelectedRowChange", "sortBy", "sortDirection", "onSortBy", "onRowClick", "size", "caption", "stickyHeader", "padding", "disableSelectOnClick"]);
|
|
3549
|
+
var placeholderText = _a.placeholderText, dropdownItems = _a.dropdownItems, isRowDisabled = _a.isRowDisabled, pagination = _a.pagination, outlined = _a.outlined, columns = _a.columns, header = _a.header, data = _a.data, onSelectedRowChange = _a.onSelectedRowChange, sortBy = _a.sortBy, sortDirection = _a.sortDirection, onSortBy = _a.onSortBy, onRowClick = _a.onRowClick, size = _a.size, caption = _a.caption, stickyHeader = _a.stickyHeader, padding = _a.padding, _b = _a.disableSelectOnClick, disableSelectOnClick = _b === void 0 ? false : _b, menuButtonLabel = _a.menuButtonLabel, props = __rest$1(_a, ["placeholderText", "dropdownItems", "isRowDisabled", "pagination", "outlined", "columns", "header", "data", "onSelectedRowChange", "sortBy", "sortDirection", "onSortBy", "onRowClick", "size", "caption", "stickyHeader", "padding", "disableSelectOnClick", "menuButtonLabel"]);
|
|
3550
3550
|
var _c = __read(React__default.useState(props.rowsPerPage || 10), 2), rowsPerPage = _c[0], setRowsPerPage = _c[1];
|
|
3551
3551
|
var _d = __read(React__default.useState(null), 2), menuAnchor = _d[0], setMenuAnchor = _d[1];
|
|
3552
3552
|
var _e = __read(React__default.useState(0), 2), currentPage = _e[0], _setCurrentPage = _e[1];
|
|
@@ -3625,7 +3625,7 @@ var GrepTable = function (_a) {
|
|
|
3625
3625
|
e.preventDefault();
|
|
3626
3626
|
break;
|
|
3627
3627
|
}
|
|
3628
|
-
}, tabIndex: 0, size: "large" },
|
|
3628
|
+
}, tabIndex: 0, size: "large", "aria-label": menuButtonLabel !== null && menuButtonLabel !== void 0 ? menuButtonLabel : 'Åpne meny' },
|
|
3629
3629
|
React__default.createElement(MoreVert, null)))));
|
|
3630
3630
|
};
|
|
3631
3631
|
var _renderRow = function (row, index) {
|