Skip to content

Commit

Permalink
fixed issue with graph explorer columns
Browse files Browse the repository at this point in the history
  • Loading branch information
KelvinTegelaar committed Mar 14, 2024
1 parent 08f6e33 commit d2d9fdc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
12 changes: 7 additions & 5 deletions src/components/tables/CippTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -342,10 +342,12 @@ export default function CippTable({
useEffect(() => {
if (columns.length !== updatedColumns.length) {
setUpdatedColumns(updatedColumns)
setColumnDefaultLayout(
endpointName,
updatedColumns.map((column) => column.exportSelector).join(','),
)
if (endpointName) {
setColumnDefaultLayout(
endpointName,
updatedColumns.map((column) => column.exportSelector).join(','),
)
}
}
}, [
columns,
Expand Down Expand Up @@ -971,7 +973,7 @@ export default function CippTable({
responsive={responsive}
dense={dense}
striped={striped}
columns={updatedColumns}
columns={dynamicColumns ? updatedColumns : columns}
data={filteredItems}
expandableRows={expandableRows}
expandableRowsComponent={expandableRowsComponent}
Expand Down
3 changes: 0 additions & 3 deletions src/views/tenant/administration/GraphExplorer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,6 @@ const GraphExplorer = () => {

function getPresetProps(values) {
var newvals = Object.assign({}, values)
console.log(newvals)
if (newvals?.$select !== undefined && Array.isArray(newvals?.$select)) {
newvals.$select = newvals?.$select.map((p) => p.value).join(',')
}
Expand All @@ -317,8 +316,6 @@ const GraphExplorer = () => {
return newvals
}

console.log(graphrequest.data)

return (
<>
<CRow>
Expand Down

0 comments on commit d2d9fdc

Please sign in to comment.