mirror of
https://github.com/Choices-js/Choices.git
synced 2024-05-21 06:56:34 +02:00
Ability to toggle flipped state
This commit is contained in:
parent
2b85aa6bae
commit
0ce7c574ea
4
assets/scripts/dist/choices.min.js
vendored
4
assets/scripts/dist/choices.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -36,6 +36,7 @@ export class Choices {
|
|||
delimiter: ',',
|
||||
paste: true,
|
||||
search: true,
|
||||
flip: true,
|
||||
regexFilter: null,
|
||||
placeholder: true,
|
||||
placeholderValue: null,
|
||||
|
@ -318,7 +319,7 @@ export class Choices {
|
|||
this.dropdown.classList.add(this.config.classNames.activeState);
|
||||
|
||||
const dimensions = this.dropdown.getBoundingClientRect();
|
||||
const shouldFlip = dimensions.top + dimensions.height >= document.body.offsetHeight;
|
||||
const shouldFlip = this.config.flip ? dimensions.top + dimensions.height >= document.body.offsetHeight : false;
|
||||
|
||||
// Whether or not the dropdown should appear above or below input
|
||||
if(shouldFlip) {
|
||||
|
|
Loading…
Reference in a new issue