Skip to content

Commit

Permalink
enable top/left dd
Browse files Browse the repository at this point in the history
  • Loading branch information
aurovrata committed Sep 14, 2021
1 parent 43001d7 commit 7869359
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions hybrid-dropdown.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ select.hybridddised{
display: none;
background-color: inherit;
}
.hybrid-dropdown.hybriddd-top .hybriddd-wrapper{
bottom:var(--hybriddd-top);
}
.hybrid-dropdown.hybriddd-left .hybriddd-wrapper{
right:0;
left:auto;
}
.hybrid-dropdown ul.hybriddd-options {
border: 1px solid #6f6f6f;
border-radius: 0.25em;
Expand Down
2 changes: 2 additions & 0 deletions hybrid-dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -992,6 +992,8 @@ class HybridDDError extends Error {
_.closeSelect();
return;
}
//set the height of the wrapper for placing it on top.
_.hdd.listwrap.style.setProperty('--hybriddd-top',_.hdd.offsetHeight+'px');
_.hdd.classList.add('active');
//adjust width of dropdown.
//setup wrapper height and width.
Expand Down

0 comments on commit 7869359

Please sign in to comment.