FlexSheet - Detect when UI has refreshed after paste operation

Posted by: holly.anderson on 11 January 2018, 3:16 pm EST

    • Post Options:
    • Link

    Posted 11 January 2018, 3:16 pm EST

    Hello,

    I’m looking for a way to execute custom logic after (1) data has been pasted on a FlexSheet bound with Knockout and (2) the FlexSheet UI has been updated with the newly pasted data. I’ve tried the pasted event, but that fires before the FlexSheet UI has been refreshed.

    Holly

  • Posted 12 January 2018, 2:57 am EST

    Hi Holly,

    The data gets pasted in FlexSheet and refresh FlexSheet. Hence, the pasted event should be the appropriate event.

    According to you, the FlexSheet do not get refreshed on pasted event.

    You may use collectionChanged or updatedView event with pasted event. Set a flag variable true in pasted event and apply custom logic based on flag variable in collectionChanged /updatedView event. Also set flag to false here.

    Hope it helps!

    ~Manish

  • Posted 12 January 2018, 8:35 am EST

    Hi Manish,

    Thanks for the workaround. If the FlexSheet is supposed to be refreshed before the pasted event fires, should this be logged a a bug? I’ve provided a sample that illustrates the issue. The paste event triggers an alert, but you can see that when the alert is presented, the pasted data isn’t yet visible in the spreadsheet.

    Holly

    FlexSheetDemo_Paste_Update.zip

  • Posted 15 January 2018, 8:23 am EST

    Hi Holly,

    This do not seem a bug since the value gets update and it shows the change once event fired. You may apply some change or styles based on some condition accordingly new data.

    If you try to get the data in pastedCell event, you will get updated data.

    ~Manish

Need extra support?

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

Learn More

Forum Channels