When using drop down menu with range-slider, the range slider is not updated immediately

In a project, I need to use drop down menu with slider. I implemented a list into a drop down menu and in that list I have the speakers. Below that drop down menu, I have a slider that shows the volumes of the selected speaker. When I used more than one speaker in my computer and when I changed the item that is in the drop down menu, the slider is not updating itself immediately.

To give an example, assume that I have Speaker 1 and Speaker 2. Speaker 1's volume is 50, and Speaker 2's volume is 80. So when Speaker one selected, I am able to see the slider is on 50, but when I changed the drop down menu item to Speaker 2, the slider needs to change itself as 80 (because all of the speakers needs to have on their own speaker volumes), but it isn't.

And I realized that no need to understand alertSpeakerData's assign process. Because it is working correctly. The slider is not updating itself immediately, the problem is this. So I updated selectAlertSpeaker function with implementing a function that works for having the speaker volume here too. Whenever a speaker selected, it is also re-setting the volume of that speaker too. It is working now.