filtering function is in an infinite loop

code:

截屏2021-10-09 11.03.37.png

截屏2021-10-09 11.04.48.png


error:

截屏2021-10-09 11.07.03.png


1 Reply

GK Gayathri KarunaiAnandam Syncfusion Team October 12, 2021 04:01 AM UTC

Hi Kk, 

We have checked your reported query. We are unable to replicate the reported issue in our end. We have prepared a sample based on your suggestion. Please check the code snippet. 

Code: 


<template> 
   <ejs-spreadsheet ref="spreadsheet" :allowFiltering='true' :dataBound="dataBound"> 
   <e-sheets> 
      <e-sheet> 
        <e-ranges> 
          <e-range :dataSource="dataSource"></e-range> 
        </e-ranges> 
             </e-sheet> 
    </e-sheets></ejs-spreadsheet> 
</template> 

<script> 
import Vue from "vue"; 
import { SpreadsheetPlugin } from "@syncfusion/ej2-vue-spreadsheet"; 
import { tradeData } from './data.js'; 
Vue.use(SpreadsheetPlugin); 
export default { 
   data: () => { 
return { 
  dataSource: tradeData, 
  }, 
  methods: { 
  dataBound: function () { 
  var spreadsheet = this.$refs.spreadsheet; 
  console.log("databound"); 
    if (spreadsheet.ej2Instances.activeSheetIndex === 0) { 
        var departments = ['Sweden', 'Canada', 'UK']; 
        var predicateList = [] 
        departments.forEach((department) => { predicateList.push({ field: 'D', predicate: 'or', operator: 'equal', value: department }); }) 
        spreadsheet.applyFilter(predicateList); 
    } 
  } 
</script> 


For your reference, please check the below sample link. 

  
  
Please check the above links and if you are still facing issue, please share the below details. 

  • If possible, please share the video demonstration of the issue.
  • Please share the code snippet of the spreadsheet.
  • If possible, try to reproduce the reported issue in provided sample or share the issue reproducible sample.
  • Please share the Syncfusion version you are using.

Please provide the above requested information, based on that we will check and provide you a better solution quickly. 

Regards, 
Gayathri K 


Loader.
Up arrow icon