@@ -9,11 +9,11 @@ class TableLinked {
9
9
this . submetric = '' ; // TODO: Fetch the default one from somewhere
10
10
this . data = data ;
11
11
this . dataArray = [ ] ;
12
- this . selectedTechs = this . getTechsFromURL ( ) ?. split ( ',' ) || [ ] ;
12
+ this . selectedTechs = DataUtils . getTechsFromURL ( ) ?. split ( ',' ) || [ ] ;
13
13
this . rows = filters . rows || 10 ;
14
14
15
15
this . updateContent ( ) ;
16
- this . updateSelectionText ( this . getTechsFromURL ( ) ) ;
16
+ this . updateSelectionText ( DataUtils . getTechsFromURL ( ) ) ;
17
17
18
18
const rowCount = document . getElementById ( 'rowsPerPage' ) ;
19
19
rowCount ?. addEventListener ( 'change' , ( e ) => this . updateRowsPerPage ( e ) ) ;
@@ -35,8 +35,6 @@ class TableLinked {
35
35
36
36
this . dataArray = this . dataArray . filter ( row => row . length > 0 ) ;
37
37
38
- console . log ( 'set content' , content , this . dataArray ) ;
39
-
40
38
const isContent = content ?. length > 0 || this . dataArray ?. length > 0 ;
41
39
42
40
if ( tbody && isContent ) {
@@ -159,11 +157,6 @@ class TableLinked {
159
157
}
160
158
}
161
159
162
- getTechsFromURL ( ) {
163
- const url = new URL ( window . location ) ;
164
- return url . searchParams . get ( 'selected' ) || null ;
165
- }
166
-
167
160
addColumnCheckbox ( app ) {
168
161
const cell = document . createElement ( 'td' ) ;
169
162
const formattedApp = DataUtils . formatAppName ( app ) ;
@@ -192,7 +185,7 @@ class TableLinked {
192
185
193
186
// Set selected content
194
187
isTechSelected ( app ) {
195
- const urlSelected = this . getTechsFromURL ( ) ;
188
+ const urlSelected = DataUtils . getTechsFromURL ( ) ;
196
189
return urlSelected ?. includes ( app ) || false ;
197
190
}
198
191
0 commit comments