2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-05-17 02:29:37 +03:00

fix: memory leak when positioning with popper (#1094)

* fix: memory leak when positioning with popper
* docs: update calculate position docs

Co-authored-by: Jeff <sagalbot@gmail.com>
This commit is contained in:
Rafał Gałka
2020-03-10 03:08:57 +01:00
committed by GitHub
parent 531949447c
commit f2479434e4
4 changed files with 29 additions and 9 deletions
+4
View File
@@ -128,6 +128,9 @@ transition: {
When `appendToBody` is true, this function is responsible for positioning the drop down list.
If a function is returned from `calculatePosition`, it will be called when the drop down list
is removed from the DOM. This allows for any garbage collection you may need to do.
See [Dropdown Position](../guide/positioning.md) for more details.
```js
@@ -139,6 +142,7 @@ calculatePosition: {
* @param width {string} calculated width in pixels of the dropdown menu
* @param top {string} absolute position top value in pixels relative to the document
* @param left {string} absolute position left value in pixels relative to the document
* @return {function|void}
*/
default(dropdownList, component, {width, top, left}) {
dropdownList.style.top = top;