Skip to content
Snippets Groups Projects
Verified Commit b5b681c5 authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

feat(datatable): add help button

parent 895ccf5a
No related branches found
No related tags found
No related merge requests found
...@@ -80,6 +80,8 @@ import {generateUniqueConfigKey} from "../host/util.mjs"; ...@@ -80,6 +80,8 @@ import {generateUniqueConfigKey} from "../host/util.mjs";
import "./datasource/dom.mjs"; import "./datasource/dom.mjs";
import "./datasource/rest.mjs"; import "./datasource/rest.mjs";
import "../form/context-help.mjs";
export {DataTable}; export {DataTable};
/** /**
...@@ -213,6 +215,10 @@ class DataTable extends CustomElement { ...@@ -213,6 +215,10 @@ class DataTable extends CustomElement {
labels: { labels: {
theListContainsNoEntries: "The list contains no entries", theListContainsNoEntries: "The list contains no entries",
copyAll: "Copy all", copyAll: "Copy all",
helpText: "<p>You can copy the values from individual rows<br>" +
"to the clipboard by double-clicking on the relevant column.</p>" +
"<p>To copy an entire row, hold down the Shift key while clicking.<br>" +
"If you want to copy all rows, you can use the <strong>Copy All</strong> button.</p>",
}, },
classes: { classes: {
...@@ -227,6 +233,7 @@ class DataTable extends CustomElement { ...@@ -227,6 +233,7 @@ class DataTable extends CustomElement {
autoInit: true, autoInit: true,
doubleClickCopyToClipboard: true, doubleClickCopyToClipboard: true,
copyAll: true, copyAll: true,
help: true,
}, },
copy: { copy: {
...@@ -1155,6 +1162,10 @@ function getTemplate() { ...@@ -1155,6 +1162,10 @@ function getTemplate() {
<slot name="filter"></slot> <slot name="filter"></slot>
</div> </div>
<div class="bar"> <div class="bar">
<monster-context-help
data-monster-attributes="class path:features.help | ?::hidden"
data-monster-replace="path:labels.helpText"
></monster-context-help>
<a href="#" data-monster-attributes="class path:features.copyAll | ?::hidden" data-monster-role="copy-all" data-monster-replace="path:locale.copyAll">Copy all</a> <a href="#" data-monster-attributes="class path:features.copyAll | ?::hidden" data-monster-role="copy-all" data-monster-replace="path:locale.copyAll">Copy all</a>
<monster-column-bar <monster-column-bar
data-monster-attributes="class path:features.settings | ?::hidden"></monster-column-bar> data-monster-attributes="class path:features.settings | ?::hidden"></monster-column-bar>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment