File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -338,7 +338,8 @@ function getTableStructure(schemaStructure) {
338338 }
339339 return {
340340 title : property . propertyKey ,
341- field : property . propertyKey ,
341+ // replace to avoid error in Tabulator
342+ field : property . propertyKey . replace ( / \. / g, 'dot' ) ,
342343 align : align ,
343344 titleFormatter : truncateTableText ,
344345 headerSort : false ,
@@ -368,6 +369,12 @@ function getTableData(queryResult) {
368369 item . data . properties [ key ] = value . value || value . original ;
369370 }
370371 }
372+ // If one of the property key has a . we replace it by the string 'dot' to avoid an error in Tabulator
373+ if ( key . includes ( '.' ) ) {
374+ Object . defineProperty ( item . data . properties , key . replace ( / \. / g, 'dot' ) ,
375+ Object . getOwnPropertyDescriptor ( item . data . properties , key ) ) ;
376+ delete item . data . properties [ key ] ;
377+ }
371378 }
372379 return { ...item . data . properties , 'id' : item . id , 'row' : index + 1 } ;
373380 } ) ;
You can’t perform that action at this time.
0 commit comments