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

前端 未结 3 1877
盖世英雄少女心
盖世英雄少女心 2021-02-07 15:00

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条回答
  •  囚心锁ツ
    2021-02-07 15:34

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

    Example :

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

    in your render:

    
        
        
        
      
    

提交回复
热议问题