diff --git a/src/components/viewtypes/ListViewTable.tsx b/src/components/viewtypes/ListViewTable.tsx index 5f393f9..2ffd46d 100644 --- a/src/components/viewtypes/ListViewTable.tsx +++ b/src/components/viewtypes/ListViewTable.tsx @@ -41,6 +41,7 @@ import { import CustomTooltip from '../shared/CustomTooltip'; import { sortPlaylist } from '../../redux/playlistSlice'; import { setColumnList } from '../../redux/configSlice'; +import { setActive } from '../../redux/albumSlice'; const StyledTable = styled(Table)<{ rowHeight: number; $isDragging: boolean }>` .rs-table-row.selected { @@ -99,6 +100,7 @@ const ListViewTable = ({ const dispatch = useAppDispatch(); const misc = useAppSelector((state) => state.misc); const configState = useAppSelector((state) => state.config); + const album = useAppSelector((state) => state.album); const [sortColumn, setSortColumn] = useState(); const [sortType, setSortType] = useState(); const [sortedData, setSortedData] = useState(data); @@ -757,7 +759,7 @@ const ListViewTable = ({ onClick={(e: any) => { if ( !column.dataKey?.match( - /starred|userRating|columnResizable|columnDefaultSort/ + /starred|userRating|genre|columnResizable|columnDefaultSort/ ) ) { handleRowClick( @@ -773,7 +775,7 @@ const ListViewTable = ({ onDoubleClick={() => { if ( !column.dataKey?.match( - /starred|userRating|columnResizable|columnDefaultSort/ + /starred|userRating|genre|columnResizable|columnDefaultSort/ ) ) { handleRowDoubleClick({ @@ -798,13 +800,13 @@ const ListViewTable = ({ whiteSpace: 'nowrap', overflow: 'hidden', paddingRight: !column.dataKey?.match( - /starred|songCount|duration|userRating|columnResizable|columnDefaultSort/ + /starred|userRating|columnResizable|columnDefaultSort/ ) ? '10px' : undefined, }} > - {column.dataKey.match(/album|artist/) ? ( + {column.dataKey.match(/album|artist|genre/) ? ( { + history.push(`/library/album?sortType=${rowData.genre}`); + }, 50); } }} playing={