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