Skip to content

Commit

Permalink
fix unable to change index in item page
Browse files Browse the repository at this point in the history
  • Loading branch information
prayag17 committed Dec 3, 2023
1 parent 50921db commit 3add9d9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/components/layouts/item/hero.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const Hero = ({
setCurrentAudioIndex(audioTracks[0]?.Index);
setCurrentSubtitleIndex(subtitleTracks[0]?.Index);
}
}, [videoTracks, audioTracks, subtitleTracks]);
}, []);

const qualityLabel = () => {
if (
Expand Down Expand Up @@ -657,11 +657,12 @@ const Hero = ({
size="small"
value={currentSubtitleIndex}
select
onChange={(e) =>
onChange={(e) => {
console.log(e.target.value);
setCurrentSubtitleIndex(
e.target.value,
)
}
);
}}
SelectProps={{
MenuProps: {
disableScrollLock: true,
Expand Down

0 comments on commit 3add9d9

Please sign in to comment.