ios – SwiftUI: How you can reset little one parameter when dad or mum parameter modifications in Customized Intents for WidgetKit


I’ve a configurable widget which permits the consumer to configure the busStop and busService to be displayed, for which busStop is the dad or mum to busService. When a consumer selects a busStop, the customers can then choose the related busServices that belongs to that busStop.

My present implementation appears to outcome within the consumer seeing “outdated” busServices if the consumer modifications the busStop (ie the dad or mum parameter). In different phrases:

Assuming customers have

1. Bus Cease 1
   a. BusService A
   b. BusService B
   c. BusService C
2. Bus Cease 2
   a. BusService D
   b. BusService E

When the consumer selects Bus Cease 1 and shows BusService A, then he/she decides to vary to Bus Cease 2, BusService A remains to be being proven and cannot be eliminated. Is there a option to clear the busService (ie the kid parameter) on the widget?

Widget intent arrange like so:
enter image description here