Browse Source

Fix sort to put nulls at ascending start

master
jeffvli 3 years ago
committed by Jeff
parent
commit
b947b02362
  1. 4
      src/redux/playQueueSlice.ts
  2. 4
      src/redux/playlistSlice.ts

4
src/redux/playQueueSlice.ts

@ -238,8 +238,8 @@ const playQueueSlice = createSlice({
[
(entry: any) =>
typeof entry[action.payload.columnDataKey] === 'string'
? entry[action.payload.columnDataKey].toLowerCase()
: entry[action.payload.columnDataKey],
? entry[action.payload.columnDataKey].toLowerCase() || ''
: entry[action.payload.columnDataKey] || '',
],
action.payload.sortType
);

4
src/redux/playlistSlice.ts

@ -37,8 +37,8 @@ const playlistSlice = createSlice({
[
(entry: any) =>
typeof entry[action.payload.columnDataKey] === 'string'
? entry[action.payload.columnDataKey].toLowerCase()
: entry[action.payload.columnDataKey],
? entry[action.payload.columnDataKey].toLowerCase() || ''
: entry[action.payload.columnDataKey] || '',
],
action.payload.sortType
);

Loading…
Cancel
Save