Skip to content

🎧 Your Personal Streaming Service

Do not reset the SongList query params

Deluanb836dfe7f495
diff --git a/ui/src/song/SongList.js b/ui/src/song/SongList.js
index e4ee3f85e..ff55c4a5a 100644
--- a/ui/src/song/SongList.js
+++ b/ui/src/song/SongList.js
@@ -49,6 +49,11 @@ const SongList = (props) => {
const dispatch = useDispatch()
const isXsmall = useMediaQuery((theme) => theme.breakpoints.down('xs'))
const isDesktop = useMediaQuery((theme) => theme.breakpoints.up('md'))
+
+ const handleRowClick = (id, basePath, record) => {
+ dispatch(setTrack(record))
+ }
+
return (
<>
<List
@@ -75,7 +80,7 @@ const SongList = (props) => {
) : (
<SongDatagrid
expand={<SongDetails />}
- rowClick={(id, basePath, record) => dispatch(setTrack(record))}
+ rowClick={handleRowClick}
contextAlwaysVisible={!isDesktop}
>
<TextField source="title" />