Pages

RSS

Select option in React JS with List

 List<string> fruitList = new List<string> { "Apple", "Orange", "Banana", "Kiwi", "Mango"};


 <select  id="filter-fruits" title="Select Fruits">

        <option value="0">All</option> null != fruitList )

         {

               fruitList .map((fruit, index) => (

               <option value={fruit} > {fruit}</option>)

         )}

  </select>

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS