From 3add9d9f8940351ddf2290e43cd2135e4ee7c8d4 Mon Sep 17 00:00:00 2001 From: Prayag Prajapati Date: Sun, 3 Dec 2023 15:47:09 +0530 Subject: [PATCH] fix unable to change index in item page --- src/components/layouts/item/hero.jsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/layouts/item/hero.jsx b/src/components/layouts/item/hero.jsx index c3544c7..092b891 100644 --- a/src/components/layouts/item/hero.jsx +++ b/src/components/layouts/item/hero.jsx @@ -106,7 +106,7 @@ const Hero = ({ setCurrentAudioIndex(audioTracks[0]?.Index); setCurrentSubtitleIndex(subtitleTracks[0]?.Index); } - }, [videoTracks, audioTracks, subtitleTracks]); + }, []); const qualityLabel = () => { if ( @@ -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,