Skip to content
Snippets Groups Projects
Commit a73ca3a1 authored by Marcos Pieras's avatar Marcos Pieras
Browse files

fix: update

parent 49f0d4d7
No related branches found
No related tags found
No related merge requests found
Pipeline #132642 failed
......@@ -84,7 +84,7 @@ export const Table = ({ data, itemsPerPage, showBarPlot, showAttributes, selecte
}, [sortOrder, data, sortColumn]);
useEffect(() => {
onPageChange(1); // Reset to the first page when sorting or itemsPerPage changes
onPageChange(1);
}, [sortColumn, sortOrder, itemsPerPage]);
const onPageChange = (page: number) => {
......@@ -121,8 +121,7 @@ export const Table = ({ data, itemsPerPage, showBarPlot, showAttributes, selecte
};
useEffect(() => {
// Recalculate pagination state
const totalPages = Math.ceil(data.length / itemsPerPage);
setSortedData(data);
setCurrentPage({
page: 1,
startIndex: 0,
......
......@@ -81,6 +81,12 @@ const TableSettings = ({
return [];
}, [configuration.displayEntity, graph]);
useEffect(() => {
if (graph && graph.nodes && graph.nodes.labels.length > 0) {
updateSettings({ displayAttributes: selectedNodeAttributes });
}
}, [selectedNodeAttributes]);
return (
<SettingsContainer>
<Input
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment