mirror of
https://github.com/Choices-js/Choices.git
synced 2026-03-14 14:45:47 +01:00
Add the flipped state class to the element
This commit is contained in:
parent
5860b55050
commit
64ed121324
1 changed files with 2 additions and 0 deletions
|
|
@ -74,6 +74,7 @@ export default class Container {
|
|||
this.isOpen = true;
|
||||
|
||||
if (this.shouldFlip(dropdownPos, dropdownHeight)) {
|
||||
addClassesToElement(this.element, this.classNames.flippedState);
|
||||
addClassesToElement(dropdown, this.classNames.flippedState);
|
||||
this.isFlipped = true;
|
||||
}
|
||||
|
|
@ -88,6 +89,7 @@ export default class Container {
|
|||
this.isOpen = false;
|
||||
|
||||
// A dropdown flips if it does not have space within the page
|
||||
removeClassesFromElement(this.element, this.classNames.flippedState);
|
||||
removeClassesFromElement(dropdown, this.classNames.flippedState);
|
||||
this.isFlipped = false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue