Undo some typings
This commit is contained in:
parent
d3ba4b103e
commit
5f82a39517
|
@ -324,7 +324,7 @@ export default abstract class DataFetch<
|
|||
}
|
||||
|
||||
// If we don't support sorting, do a client-side sort
|
||||
if (!this.features.supportsSort && clientSideSorting) {
|
||||
if (!this.features.supportsSort && clientSideSorting && sortType) {
|
||||
rows = sort(rows, sortColumn as any, sortOrder, sortType)
|
||||
}
|
||||
|
||||
|
|
|
@ -552,7 +552,7 @@ export function search<T extends Record<string, any>>(
|
|||
*/
|
||||
export function runQuery<T extends Record<string, any>>(
|
||||
docs: T[],
|
||||
query: SearchFilters | null
|
||||
query: SearchFilters
|
||||
): T[] {
|
||||
if (!docs || !Array.isArray(docs)) {
|
||||
return []
|
||||
|
@ -876,7 +876,7 @@ export function sort<T extends Record<string, any>>(
|
|||
docs: T[],
|
||||
sort: keyof T,
|
||||
sortOrder: SortOrder,
|
||||
sortType: SortType | null = SortType.STRING
|
||||
sortType = SortType.STRING
|
||||
): T[] {
|
||||
if (!sort || !sortOrder || !sortType) {
|
||||
return docs
|
||||
|
|
Loading…
Reference in New Issue