Applying rowFilters and filtering makes the dragFill freezing

Posted by: davide.vago on 7 January 2020, 9:19 am EST

    • Post Options:
    • Link

    Posted 7 January 2020, 9:19 am EST

    Good morning/afternoon

    I’m currently experimenting an issue which I can’t debug as no errors are being logged.

    I’ve a spreadsheet instance (Workbook) with one sheet.

    The sheet has data injected via setDataSource method and has some manipulations like:

    • custom event bindings (SelectionChanged/CellChanged/ EditChange etc…)
    • custom commands (to enable F2 shortcut)
    • custom headers text (to change the first row back to A,B,C rather than the key coming from the setDataSource)

    Between the initialization of the spreadsheet instance I also set up a filter section which has the following steps:

    const totalRows = this.activeSheet.getRowCount() - this.metrixCount - 1
    const totalCols = this.activeSheet.getColumnCount()
    const range = new GC.Spread.Sheets.Range(1, 0, totalRows, totalCols)
    const rowFilter = new GC.Spread.Sheets.Filter.HideRowFilter(range)
    
    this.activeSheet.rowFilter(rowFilter)
    rowFilter.filterButtonVisible(0, true)
    

    metrixCount is a number of stats that I generate and plunk within the sheet (imagine 3 rows at the very end for avg/min/max)

    As soon as I apply this filter block the sheet shows the filters as expected, however as soon as I start using them the selection screws up…

    I’ve tried spamming the codebase with suspendPaint, suspendCalcService, suspendEvent, suspendDirty and related resume functions but I had no luck.

    Strangely enough, the issue doesn’t happens as I filter via a custom UI (not the native context menu of SpreadJS)

    Please look at the small attached video of the issue to understand better the issue

  • Posted 7 January 2020, 9:20 am EST

  • Posted 8 January 2020, 1:58 am EST

    Hi Davide,

    We are sorry but we are unable to replicate the issue at our end, could you please have a look at the following sample and let us know if we are missing something in order to replicate the issue:

    https://codesandbox.io/s/spread-js-starter-swczx

    Also, please let us know about the exact spread version you are using so that we may test on the same version.

    Regards

  • Posted 8 January 2020, 2:12 pm EST

    Thanks Sharad for sharing your code sample,

    I’m using v 13.0.3, I literally copied over the code for setting up data source, filtering and the issue still happening, I did remove all the other functions in order to debug but for some reason the behaviour explained above still happening.

    The difference between the code is that my spread and sheet variables are $root variables in a Vue js environment. Do you have anything that enables debugging messages within the GC library?

  • Posted 8 January 2020, 11:57 pm EST

    Hi Davide,

    I tested it out with the 13.0.3 and was still unable to replicate the issue. Could you please share the sample replicating the issue so that we could further investigate the issue? If the sample contains some sensitive information that you can’t share on the public forum then you may create a case on our private portal(https://supportone.componentone.com) and share the sample.

    Do you have anything that enables debugging messages within the GC library?

    We are sorry but we do not have any such option.

  • Posted 9 January 2020, 6:17 am EST

    Good morning/afternoon Sharad,

    Thanks for getting back, I opened the case 416061 via the private portal with a “sample” vue component which replicates the code you wrote in the sandbox.

    Thanks for the support.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels