first building by default expanded
This commit is contained in:
parent
49f15f574c
commit
78894918c0
@ -108,7 +108,11 @@ const InfraTable = ({ buildings }) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
if (buildings && buildings.length > 0) {
|
||||||
setProjectBuilding(buildings);
|
setProjectBuilding(buildings);
|
||||||
|
// Automatically expand the first building
|
||||||
|
setExpandedBuildings([buildings[0].id]);
|
||||||
|
}
|
||||||
}, [buildings]);
|
}, [buildings]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user