we have an extern refresh as well and would like to keep the information of the selected ressource in local storage -
can you tell me which event sets the selected ressource?
thnaks
|
onDataBound: function (args) {
let scheduleObj = this.$refs.ScheduleObj;
console.log(scheduleObj.ej2Instances.getResourcesByIndex(1))
} |
the example is in angular - but i use VUE!
enable Persistence - is a good beginning - but it just safes the current View! the selceted resource is missing - important - my problem is only on mobile devices when i use "enableCompactView:
|
// We can maintain these in DB
let savedGroupIndex;
let currentGroupIndex;
getGroupIndex: function () {
let scheduleObj = this.$refs.ScheduleObj;
// Store the current groupIndex in the global variable
savedGroupIndex = scheduleObj.ej2Instances.uiStateValues.groupIndex;
console.log(savedGroupIndex);
},
setGroupIndex: function () {
let scheduleObj = this.$refs.ScheduleObj;
currentGroupIndex = scheduleObj.ej2Instances.uiStateValues.groupIndex;
if (savedGroupIndex != currentGroupIndex) {
// Restore the persisted groupIndex to the Schedule from global variable
scheduleObj.ej2Instances.uiStateValues.groupIndex = savedGroupIndex;
scheduleObj.ej2Instances.refresh();
}
} |