Skip to content

Commit f025709

Browse files
committed
Lumino v1 compat
1 parent 8db8ca8 commit f025709

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

js/core/transformExecutors.ts

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import { Dict } from '@jupyter-widgets/base';
22

3-
import { filter } from '@lumino/algorithm';
4-
53
import { Transform } from './transform';
64
import { DataSource } from '../datasource';
75

@@ -186,7 +184,7 @@ export class FilterExecutor extends TransformExecutor {
186184
}
187185

188186
const data: Dict<any[]> = {};
189-
const indices = Array.from(filter(Array(input.length).keys(), filterFunc));
187+
const indices = Array.from(Array(input.length).keys()).filter(filterFunc);
190188

191189
// There is a better approach for this
192190
// We don't need to copy the data
@@ -286,17 +284,16 @@ export class SortExecutor extends TransformExecutor {
286284
);
287285
};
288286

289-
const nanIndices = Array.from(
290-
filter(Array(input.length).keys(), (idx: number) => {
287+
const nanIndices = Array.from(Array(input.length).keys()).filter(
288+
(idx: number) => {
291289
return isNaNorNull(input.data[field][idx]);
292-
}),
290+
},
293291
);
294-
const nonNanIndices = Array.from(
295-
filter(Array(input.length).keys(), (idx: number) => {
292+
const nonNanIndices = Array.from(Array(input.length).keys()).filter(
293+
(idx: number) => {
296294
return !isNaNorNull(input.data[field][idx]);
297-
}),
295+
},
298296
);
299-
300297
if (columnDataType == 'string') {
301298
if (this._options.desc) {
302299
sortFunc = (a: number, b: number): number => {

0 commit comments

Comments
 (0)