Skip to content

Commit

Permalink
indicate more values (...) in filter dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
Rello committed Jan 20, 2025
1 parent cb9851c commit 974f7cf
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
### Fixed
- dark mode issues
- align border in filter dialog
- indicate more values (...) in filter dialog

## 5.2.3 - 2025-01-14
### Added
Expand Down
2 changes: 1 addition & 1 deletion css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ div.dt-container .dt-paging .dt-paging-button {

.dropDownList {
border-color: var(--color-primary-element) !important;
position: absolute;
/* position: absolute; hide so the full menu is being shown */
z-index: 9999;
background-color: var(--color-main-background);
border-top: none !important;
Expand Down
10 changes: 10 additions & 0 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,12 @@ OCA.Analytics.UI = {
listCount++;
}

// show a dummy element when the list is longer
let liDummy = document.createElement('li');
liDummy.innerText = '...';
liDummy.id = 'dummy';
ul.appendChild(liDummy);

// add the list to the input field and "open" its border at the bottom
inputField.insertAdjacentElement('afterend', ul);
inputField.classList.add('dropDownListParentOpen');
Expand Down Expand Up @@ -558,6 +564,10 @@ OCA.Analytics.UI = {
if (txtValue.toUpperCase().indexOf(filter) > -1 && listCount < listCountMax) {
li[i].style.display = "";
listCount++;
} else if (li[i].id === 'dummy' && listCount >= listCountMax) {
// always show the ... when there are more values available
li[i].style.display = "";
listCount++;
} else {
li[i].style.display = "none";
}
Expand Down

0 comments on commit 974f7cf

Please sign in to comment.