React component style apply after refreshing the page

34 views Asked by At

In my react application. I am using a Choice JS library for creating a multi select dropdown. Everything working fine but after enabling the routing in my application when I switch from Home to group component 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

0

There are 0 answers