Building a Single Page Application with several Kendo Grids.
Also using Kendo Grids in various "popups" and "tooltips".
Using Angular 1.3.14.
I've noticed that Kendo seems to be "polluting" the DOM and not removing elements.
My page on load (no grids shown yet):
As soon as I load a view with some Kendo Grids, I start to see this in my DOM:
For just my first view, I see ~10 `k-list-container` divs being added to the DOM. All of them are display: none.
When I expanded one of them I see:
![]()
Ok, so I figured out these k-lists must be for EACH column in each grid that I show.
However, for almost all of my grids and columns, I **DO NOT** want to show the operators item. I'm disabling it in javascript with:
Yet the DOM is still being created. What's worse, is when my view changes to another page (using Angular) and the grids Angular Controllers are being destroyed, etc., all these DOM elements remain...they are never being removed or cleaned out.
Furthermore, I'm using a Kendo Grid as tooltip/hover/popup with **2** columns. Every time the user hovers to display the tooltip, it's creating another TWO <div class=k-list-container> div for the columns where again, I'm setting showOperators = false. The issue is that if the user displays the tooltip say 10 or 20 times during their use of the webapp, I've not got 40 extra DOM elements that are never used AND never removed or cleaned up.
Can anyone explain what's going on here? How can I clean up the DOM? How can i prevent the creation of these elements? Is it an issue with the Kendo Angular directive not correctly removing the Operators list element from the DOM when the directive/controller is destroyed by angular?
Also using Kendo Grids in various "popups" and "tooltips".
Using Angular 1.3.14.
I've noticed that Kendo seems to be "polluting" the DOM and not removing elements.
My page on load (no grids shown yet):
<
body
>
<
div
>Load some stuff via angular</
div
>
<
script
>load some scripts</
script
>
</
body
>
As soon as I load a view with some Kendo Grids, I start to see this in my DOM:
<
body
>
<
div
>Load some stuff here with angular </
div
>
<
script
>some script tags</
tag
>
<
div
class
=
"k-list-container k-popup k-group k-reset"
data-role
=
"popup"
style
=
"position: absolute; height: 200px; display: none;"
><
ul
unselectable
=
"on"
class
=
"k-list k-reset"
tabindex
=
"-1"
role
=
"listbox"
aria-hidden
=
"true"
aria-live
=
"off"
style
=
"overflow: auto; height: 194.847999572754px;"
><
li
tabindex
=
"-1"
role
=
"option"
unselectable
=
"on"
class
=
"k-item k-state-selected k-state-focused"
>Is equal to</
li
><
li
tabindex
=
"-1"
role
=
"option"
unselectable
=
"on"
class
=
"k-item"
>Is not equal to</
li
><
li
tabindex
=
"-1"
role
=
"option"
unselectable
=
"on"
class
=
"k-item"
>Starts with</
li
><
li
tabindex
=
"-1"
role
=
"option"
unselectable
=
"on"
class
=
"k-item"
>Contains</
li
><
li
tabindex
=
"-1"
role
=
"option"
unselectable
=
"on"
class
=
"k-item"
>Does not contain</
li
><
li
tabindex
=
"-1"
role
=
"option"
unselectable
=
"on"
class
=
"k-item"
>Ends with</
li
></
ul
></
div
>
<
div
class
=
"k-list-container k-popup k-group k-reset"
data-role
=
"popup"
style
=
"display: none; position: absolute;"
><
ul
unselectable
=
"on"
class
=
"k-list k-reset"
tabindex
=
"-1"
role
=
"listbox"
aria-hidden
=
"true"
aria-live
=
"polite"
style
=
"overflow: auto;"
></
ul
></
div
>
<
div
class
=
"k-list-container k-popup k-group k-reset"
data-role
=
"popup"
style
=
"display: none; position: absolute;"
><
ul
unselectable
=
"on"
class
=
"k-list k-reset"
tabindex
=
"-1"
role
=
"listbox"
aria-hidden
=
"true"
aria-live
=
"polite"
style
=
"overflow: auto;"
></
ul
></
div
>
...
</
body
>
For just my first view, I see ~10 `k-list-container` divs being added to the DOM. All of them are display: none.
When I expanded one of them I see:
Ok, so I figured out these k-lists must be for EACH column in each grid that I show.
However, for almost all of my grids and columns, I **DO NOT** want to show the operators item. I'm disabling it in javascript with:
filterable: {
cell: {
operator:
"contains"
,
showOperators:
false
,
suggestionOperator:
"contains"
}
}
Yet the DOM is still being created. What's worse, is when my view changes to another page (using Angular) and the grids Angular Controllers are being destroyed, etc., all these DOM elements remain...they are never being removed or cleaned out.
Furthermore, I'm using a Kendo Grid as tooltip/hover/popup with **2** columns. Every time the user hovers to display the tooltip, it's creating another TWO <div class=k-list-container> div for the columns where again, I'm setting showOperators = false. The issue is that if the user displays the tooltip say 10 or 20 times during their use of the webapp, I've not got 40 extra DOM elements that are never used AND never removed or cleaned up.
Can anyone explain what's going on here? How can I clean up the DOM? How can i prevent the creation of these elements? Is it an issue with the Kendo Angular directive not correctly removing the Operators list element from the DOM when the directive/controller is destroyed by angular?