Closed AMINEBOURZIQ closed 3 years ago
Hello Ghulam, I tried the code bellow but the list is not working. Can you please help. Thanks.
<div className="form-group"> <label htmlFor="guest_field">No. of Guests</label> <select className="form-control" id="guest_field" value={guests} onChange={(e) => setGuests(e.target.value)} > {[1, 2, 3, 4, 5, 6].map((num) => { <option key={num} value={num}> {num} </option>; })} </select> </div>
Hello Ghulam, I tried the code bellow but the list is not working. Can you please help. Thanks.