File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
assets/admin/components/screen/util Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,9 @@ function GridGenerationAndSelect({
2828} ) {
2929 const { t } = useTranslation ( "common" ) ;
3030 const dispatch = useDispatch ( ) ;
31- const [ key , setKey ] = useState ( regions . length > 0 ? regions [ 0 ] [ "@id" ] : "" ) ;
31+ const [ selectedRegion , setSelectedRegion ] = useState (
32+ regions . length > 0 ? regions [ 0 ] [ "@id" ] : "" ,
33+ ) ;
3234 const [ selectedPlaylists , setSelectedPlaylists ] = useState ( [ ] ) ;
3335
3436 /**
@@ -139,11 +141,6 @@ function GridGenerationAndSelect({
139141 setSelectedPlaylists ( playlists ) ;
140142 } ;
141143
142- /** @param {string } id - The id of the selected tab */
143- const handleSelect = ( id ) => {
144- setKey ( id ) ;
145- } ;
146-
147144 /**
148145 * Removes playlist from list of playlists, and closes modal.
149146 *
@@ -169,7 +166,7 @@ function GridGenerationAndSelect({
169166 grid = { grid }
170167 vertical = { vertical }
171168 regions = { regions }
172- selected = { key }
169+ selected = { selectedRegion }
173170 />
174171 </ div >
175172 </ div >
@@ -180,7 +177,7 @@ function GridGenerationAndSelect({
180177 < Tabs
181178 defaultActiveKey = { regions [ 0 ] [ "@id" ] }
182179 id = "tabs"
183- onSelect = { handleSelect }
180+ onSelect = { setSelectedRegion }
184181 className = "mb-3"
185182 >
186183 { regions &&
You can’t perform that action at this time.
0 commit comments