We have a multi select dropdown say with option "All, A , b, c , D"
Requirement: Whenever user selects "All" , then user cannot select any other option. If user selects anything else , then he can select multiple things.
My logic : Create a javaScript which reads the value selected by the user and then if "All" is selected , then convert multiselect drop down to a normal dropdown . If anything else is selected , then let it be a multiselect dropdown .
Things i have tried:
1) Fetching value from dropdown to JavaScript using "splunkjs/mvc/textinputview" (var token_def = defaultTokenModel.get("token_name");)
2) If token_def = "all" , then render the view to normal dropdown . Else it remains to be multiselect dropdown.
Second thing i want to try it by using global flag . Setting it value 1 when "All" is selected and "0" for others , then passing it to html.
Please advice. Please provide me doc related to javascript if available since i am new in this.
Thanks in Advance!!!
↧