You need to sign in to do that
Don't have an account?
Shrutii
How to reset picklist values back to default in a lightning component
I am having modal pop up in account page, in that modal I have 1 picklist. We select 1 value from picklist and click on proceed button, based on the value selected from picklist a record type opens. But the issue is, again if I open the modal pop up same picklist value is selected by default until I reload the page. Can anyone please help me and suggest a solution so that If I click on proceed button, either the component refresh or picklist value should again reset to default "--NONE--".
Note : I tried $A.get('e.force:refreshView').fire(); this, but this is not working and setting value of the picklist to --NONE-- using component.set is the setting it to --NONE-- but then no other value is displayed when I click on picklist.
Note : I tried $A.get('e.force:refreshView').fire(); this, but this is not working and setting value of the picklist to --NONE-- using component.set is the setting it to --NONE-- but then no other value is displayed when I click on picklist.
1.Implement resettable lightning interface 2.Extends this interface 3. Implement value change handler to reset values Whenever you change value of toReset attribute, related c.onReset handler executes to repopulate/reset other attributes and as result this will trigger component rerendering similar to initial state/view.
Thank You
www.nubeselite.com
Developement | Training | Consulting
Please mark this as solution if your problem resolved.
I could not get, what should be there in onReset controller ?
Could you please elaborate.