Setting selection via bitset as an argument

Can we have an API endpoint for doing like this

const bitset = new BitSet();
... modify bitset
this.selection.applyBitset(bitset);

To give a little bit more of the context. We made fuctionality where user can select rows by clicking on segment of the chart. While we have no API other than just this.selection.set() we select it row by row. But that generates a huge performance issue for a dataset with 10k rows where we select a third part of it.

That makes sense, we’ll expose a way to quickly manipulate the bitsets. The problem is that by default, BitSet.set(i, flag) method fires an event that many objects (such as grid) listen and react to. Stay tuned for updates.

1 Like

We have added a couple of more efficient methods for bitset manipulation, check out this example:

https://dev.datagrok.ai/js/samples/data-frame/bitset/select-rows-fast

1 Like

Can you please add fireChanged() method to the dataframe.d.ts also?

export class BitSet {
...
    fireChanged(): void
}

Does setAll() support the notification flag?

Added to dataframe.d.ts: fireChanged(): void
Added “notify” parameter to the setAll method.

The changes will be available on our dev server in ~30 minutes.

1 Like

That’s really awesome!