File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -768,7 +768,7 @@ export default class RowManager extends CoreFeature{
768768 }
769769
770770 setActiveRows ( activeRows ) {
771- this . activeRows = this . activeRows = Object . assign ( [ ] , activeRows ) ;
771+ this . activeRows = activeRows . slice ( ) ;
772772 this . activeRowsCount = this . activeRows . length ;
773773 }
774774
Original file line number Diff line number Diff line change @@ -3,6 +3,9 @@ import RowComponent from './RowComponent.js';
33import Helpers from '../tools/Helpers.js' ;
44
55export default class Row extends CoreFeature {
6+
7+ static rowTemplate = Row . createRowTemplate ( ) ;
8+
69 constructor ( data , parent , type = "row" ) {
710 super ( parent . table ) ;
811
@@ -25,6 +28,7 @@ export default class Row extends CoreFeature{
2528
2629 this . created = false ;
2730
31+
2832 this . setData ( data ) ;
2933 }
3034
@@ -36,12 +40,7 @@ export default class Row extends CoreFeature{
3640 }
3741
3842 createElement ( ) {
39- var el = document . createElement ( "div" ) ;
40-
41- el . classList . add ( "tabulator-row" ) ;
42- el . setAttribute ( "role" , "row" ) ;
43-
44- this . element = el ;
43+ this . element = Row . rowTemplate . cloneNode ( false ) ;
4544 }
4645
4746 getElement ( ) {
@@ -484,4 +483,11 @@ export default class Row extends CoreFeature{
484483
485484 return this . component ;
486485 }
486+
487+ static createRowTemplate ( ) {
488+ const rowTemplate = document . createElement ( "div" ) ;
489+ rowTemplate . classList . add ( "tabulator-row" ) ;
490+ rowTemplate . setAttribute ( "role" , "row" ) ;
491+ return rowTemplate ;
492+ }
487493}
You can’t perform that action at this time.
0 commit comments