ghulamabbas2 / bookit

bookit.vercel.app
85 stars 55 forks source link

DropDown not working #2

Closed AMINEBOURZIQ closed 3 years ago

AMINEBOURZIQ commented 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>