Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Monster
Manage
Activity
Members
Plan
Jira
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OSS
Libraries
Javascript
Monster
Commits
9e51768f
Commit
9e51768f
authored
10 months ago
by
Martin Massenberg
Committed by
Volker Schukai
10 months ago
Browse files
Options
Downloads
Patches
Plain Diff
feat: new options to define the markers that are used for the label template #203
parent
dba09096
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+2
-1
2 additions, 1 deletion
CHANGELOG.md
source/components/datatable/filter.mjs
+16
-1
16 additions, 1 deletion
source/components/datatable/filter.mjs
with
18 additions
and
2 deletions
CHANGELOG.md
+
2
−
1
View file @
9e51768f
# Changelog
## 2024-06-22
-
new options to define the markers that are used for the label template
[
#203
](
https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/203
)
## [3.66.0] - 2024-06-21
...
...
This diff is collapsed.
Click to expand it.
source/components/datatable/filter.mjs
+
16
−
1
View file @
9e51768f
...
...
@@ -215,6 +215,10 @@ class Filter extends CustomElement {
* @property {Object} templates Template definitions
* @property {string} templates.main Main template
* @property {Object} labels Label definitions
* @property {Object} formatter label Template Formatter definitions
* @property {Object} formatter.marker
* @property {Object} formatter.marker.open
* @property {Object} formatter.marker.close
* @property {string} labels.search Search button label
* @property {string} labels.reset Reset button label
* @property {Object} queries Query definitions
...
...
@@ -227,8 +231,14 @@ class Filter extends CustomElement {
templates
:
{
main
:
getTemplate
(),
},
formatter
:
{
marker
:
{
open
:
null
,
close
:
null
}
},
labels
:
{
search
:
"
Search
"
,
reset
:
"
Reset
"
,
save
:
"
Save
"
,
...
...
@@ -925,6 +935,7 @@ function buildSearchQuery(queries) {
*/
function
collectSearchQueries
()
{
const
currentHash
=
parseBracketedKeyValueHash
(
getGlobal
().
location
.
hash
);
const
self
=
this
;
return
new
Promise
((
resolve
,
reject
)
=>
{
const
query
=
[];
...
...
@@ -1001,6 +1012,10 @@ function collectSearchQueries() {
},
});
if
(
self
.
getOption
(
"
formatter.marker.open
"
))
{
formatter
.
setMarker
(
self
.
getOption
(
"
formatter.marker.open
"
),
self
.
getOption
(
"
formatter.marker.close
"
));
}
let
queryPart
=
formatter
.
format
(
template
);
if
(
queryPart
)
{
if
(
isFunction
(
wrapCallback
))
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment