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