You need to somehow update the selectedIndex field from the inner component. Since inner components don't have access to their parents by default you can do it one of the following ways:
Inject a service in both the parent and child components.
thank-you for your reply. I managed to do it using parent - child component as suggested.
Passing the value as a parameter and using it as the index. - Chat GPT also gave some suggestions