How to provide Picker a default “Please select…” option?

前端 未结 3 711
刺人心
刺人心 2021-02-07 14:49

I\'d like to make my Picker to show a \"default option\" on startup. That means: something like \"Please select an option\".

I\'ve tried to add a option manually with th

3条回答
  •  梦毁少年i
    2021-02-07 15:31

    Just in the default class try to add default value that you want to display.

    Example :

    this.state = {         
            type: "House",          
        };
    

    in your render:

    
        
        
        
      
    

提交回复
热议问题