list bug fix
This commit is contained in:
@@ -68,6 +68,16 @@ const List: React.FC<ListProps> = ({ items = [], remove }) => {
|
||||
});
|
||||
}, [activeModule]);
|
||||
|
||||
useEffect(() => {
|
||||
const expanded: Record<string, boolean> = { "unassigned-zone": true };
|
||||
if (zones.length > 0) {
|
||||
zones.forEach((zone: any) => {
|
||||
expanded[zone.zoneUuid] = true;
|
||||
});
|
||||
}
|
||||
setExpandedZones(expanded);
|
||||
}, [zones.length]);
|
||||
|
||||
const toggleZoneExpansion = (zoneUuid: string) => {
|
||||
setExpandedZones((prev) => ({
|
||||
...prev,
|
||||
|
||||
Reference in New Issue
Block a user