this is my code, I am setting an active class while clicking one of the items and I want one first one should always be selected when I open this dialogue.
is the main line to address. The false argument for useState is setting the default value of isActive. You probably want that to be 0 to select the first item by default: