first building by default expanded

This commit is contained in:
Pramod Mahajan 2025-06-10 18:11:36 +05:30
parent 49f15f574c
commit 78894918c0

View File

@ -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 (