ollyspooner / mx-widget-IntlPhoneInput

1 stars 0 forks source link

change the initial country based on dynamic attribute issue #6

Open MohamedElNady opened 2 years ago

MohamedElNady commented 2 years ago

Hello, I have a problem with initial country attribute. this is my case details : the user choose the country from a (reference selector) then i pass it to another attribute called 'Government' and refresh the object and this attribute 'Government' i set in as a "attribute for initial country" in the widget. what happen is the initial country is always be the first country and it never change to the selected country after user choose it.

what is my expectation: when user select the country from reference selector and i pass it to another attribute 'Government' the initial country should change dynamic to get the selected country.

ollyspooner commented 2 years ago

I suspect that the widget does not re-render itself when the context changes. We may be able to look at this next time we review this widget (which may be some time) or you can contribute your own fix via a PR.