0

In my react application. I am using a Choice JS librray for creating a multi select dropdown. Everything working fine but after enabling the routing in my application when I switch from Home to group componenet the multi value select dropdown styles are not applying but if I refresh the page then the style is applied.

I added all the required css and js files inside a index.html

 <div className="mb-3">
            <select
              id="choices-multiple-remove-button"
              placeholder="Select Maximum 5 Members"
              multiple
              onChange={(e) => setGroupUsers(e.target.value)}
            >
              {userList?.map(user => <option value={user.userId} key={user.userId}>{user.name}</option>)}
            </select>
          </div>

the options are generating dynamically from the database

Rabner Casandara
  • 151
  • 3
  • 18

0 Answers0