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 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)
|
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>>(
|
export function runQuery<T extends Record<string, any>>(
|
||||||
docs: T[],
|
docs: T[],
|
||||||
query: SearchFilters | null
|
query: SearchFilters
|
||||||
): T[] {
|
): T[] {
|
||||||
if (!docs || !Array.isArray(docs)) {
|
if (!docs || !Array.isArray(docs)) {
|
||||||
return []
|
return []
|
||||||
|
@ -876,7 +876,7 @@ export function sort<T extends Record<string, any>>(
|
||||||
docs: T[],
|
docs: T[],
|
||||||
sort: keyof T,
|
sort: keyof T,
|
||||||
sortOrder: SortOrder,
|
sortOrder: SortOrder,
|
||||||
sortType: SortType | null = SortType.STRING
|
sortType = SortType.STRING
|
||||||
): T[] {
|
): T[] {
|
||||||
if (!sort || !sortOrder || !sortType) {
|
if (!sort || !sortOrder || !sortType) {
|
||||||
return docs
|
return docs
|
||||||
|
|
Loading…
Reference in New Issue