Hi,
After I upgrade the Syncfusion dependencies to V20.1.47, I encounter a problem that DateRangePicker's enabled property can cause the following error shown in the console.
Uncaught (in promise) TypeError: this.$.slots.default is not a function
at Proxy.push../node_modules/@syncfusion/ej2-vue-base/src/component-base.js.ComponentBase.fetchChildPropValues (component-base.js:189:1)
at Proxy.push../node_modules/@syncfusion/ej2-vue-base/src/component-base.js.ComponentBase.updated (component-base.js:136:1)
at callWithErrorHandling (runtime-core.esm-bundler.js:155:1)
at callWithAsyncErrorHandling (runtime-core.esm-bundler.js:164:1)
at Array.hook.__weh.hook.__weh (runtime-core.esm-bundler.js:2667:1)
at flushPostFlushCbs (runtime-core.esm-bundler.js:356:1)
at flushJobs (runtime-core.esm-bundler.js:401:1)
I was wondering if this is a bug in the latest version.
Regards,
Arvin
P.S.
1. The demo developed uses Vue.js 3 + Electron 18.
2.
isEnabled is defined as false (bool) in data If we use ':enabled="true"' instead, the error does not occur on my end.
3. Btw, I encountered the same issue for the Grid component, and I cannot find which property causes this issue. I can confirm that everything is fine when I return to V19.4.53
Hi Arvin,
Based on your shared information, we checked your reported query, but we were unable to replicate the issue in our end. Please find the sample and code snippet below for refence.
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/Daterange737832163
|
<template> <div class="wrap"> <ejs-daterangepicker id="daterangepicker" :enabled="isEnabled" :placeholder="waterMarkText"></ejs-daterangepicker> </div> </template>
<script> import Vue from 'vue'; import { DateRangePickerPlugin } from "@syncfusion/ej2-vue-calendars"; Vue.use(DateRangePickerPlugin);
export default { name: 'HelloWorld', data: function() { return { waterMarkText: "Select a Range", isEnabled: false, }; }, }; |
|
|
Kindly check with the above sample, if issue still exists in your end, please share the issue replicating sample to check and provide you the solution at earliest.
Regards,
Ponmani M
Hi Ponmani,
I have tried to clean the project and reinstalled all dependencies, but the issue still exists. As mentioned above, everything seems to be fine when I return to V19.4.53. I have attached the demo as follows. You could follow 5 and 6 in this link to configure the project. Once the configurations are in place and the demo is launched in dev mode, you could toggle the dev tools by Ctrl+Shift+I. I can see the above error message on my end. The corresponding components are at least SearchForm.vue and SearchResultGrid.vue.
Hope to know if anything is wrong. Thanks!
Regards,
Arvin
Hi Arvin,
Thanks for providing additional information to replicate the issue. We will validate and update the details in two business days (12 April 2022).
Thanks,
Deepak R.
Hi Arvin,
Sorry for the inconvenience caused.
We need additional time to validate the issue further . We will update the details within two business days(19th, April 2022).
Thanks,
Hi,
I still fail to sort out the issue. I was wondering if there is any update on your end.
Thanks much,
Arvin
Hi CENK GUNAY,
Greetings from Syncfusion support.
We ensured the reported issue based on the shared details, We are used your shared sample and
tried to replicate your issue on our end but it’s not replicate on our end. We got error in this.invokeIpc() method in SearchForm.Vue file. So, we commented and ran it’s works fine We have attached the video sample for your reference. Please replicate your issue in attached sample and sent sample to us. This will help us provide a prompt solution.
Regards
Mohanraj M
Hi,
Sorry but this demo is not developed as a web app. I use Vue.js 3 + Electron 18 for a cross-platform desktop app. Hence, using web browsers is not supported and that's why you will get errors in this.invokeIpc(), since IPC channels are used by Electron for desktop apps. Actually, I feel confused since I just use the IPC channels for updating some component properties.
Could you please follow the 5th and 6th points in this link to try again and see if you could get the aforementioned exception in the console integrated into the app (but not the browser)? The key accelerator is Ctrl+Shift+I.
Thanks,
Arvin
Hi Arvin Staff,
We are currently validating your requirement and we will update further details in one business day (05/02/2022).
Regards,
Mohanraj M
Hi Arvin Staff,
We are currently validating your requirement and we will update further details in two business day (05/02/2022).
Regards,
Mohanraj M
Hi,
Have you tried to use "npm install" rather than "npm ci"? If not, could you please try to use "npm install" for my previous sample? I will try to provide another simplified sample as soon as possible at the same time.
Thanks,
Arvin
Hi,
I have attached a new sample for you. You can now run "npm install" and then "npm run electron:serve" under the root directory to run the desktop app. After the app starts, you can use the key accelerator (Ctrl + Shift + I) to open the chrome dev tools for the app and you may see the error indicating Uncaught (in promise) TypeError: this.$.slots.default is not a function.
This error is not necessarily related to the date range picker but "component-base". I can confirm that everything works well if I roll back to Syncfusion 19.4.54. No luck with any version higher.
I was wondering if you could help sort out the reason for the error. Thanks!
Regards,
Arvin
Hi Arvin,
We are validating the requirement. We will update the further details in two business days (5th May 2022).
Regards,
Udhaya Kumar D
Hi,
Could you find out the cause of the issue? Is it a Syncfusion side problem or a project-specific problem caused by any other factors like compatibility issues?
Thanks,
Arvin
Hi,
I have updated the demo to use the latest Syncfusion. I can confirm that everything works well if I roll back to Syncfusion 19.4.54 (also remove the license since it's not needed in that version). No luck with any version higher.
What do you reckon causes the issue?
Regards,
Arvin
| return { appImagePath: path.join(process.env.BASE_URL, "assets/app_icon.png"), global, isEnabled: true, hasBarLayout: this.isBarLayout, maxDateRangeSpan: global.common.DEFAULT_MAX_DATE_RANGE_SPAN, minDate: global.common.MIN_MIN_DATE, stockList: [], stockListItemTemplate: () => { return { template: createApp().component("stockListItemTemplate", { template: ` <div class="flex justify-between"> <span class="text-grey-primary">{{ data[global.common.STOCK_SYMBOL_KEY] }}</span> <span class="text-content">{{ data[global.common.STOCK_NAME_KEY] }}</span> </div>`, data() { return { data: {}, global }; }, }), }; }, zhCN, }; }, //The updated hook runs after data changes on your component and the DOM re-renders. updated(){ this.isEnabled = false; }, |
Hi,
Thanks for your reply!
Unfortunately, I don't reckon it actually solves the issue. The primary logic is that I need to disable the syncfusion components when starting the app (isEnabled=false). Then, after data is ready (notified via Electron's IPC channel event which is initialised in mounted()), enable the components (isEnabled = true). If isEnabled is set to true at initial in data(), there is actually no data change on "isEnabled" as stated above. Hence, the updated hook is not triggered. The highlighted code in updated() takes no effect.
I have provided a new sample to comment out Electron IPC related code to better demonstrate the logic. In SearchForm.vue, you can see that simply changing the value of isEnabled (as long as it is different in data() and mounted()) can cause the exception in the console. Please NOTE that Syncfusion 19.4.54 or earlier has no such issue with the same code using Vue.js 3 + Electron 18.
Regards,
Arvin
P.S.
You can now run "npm install" and then "npm run electron:serve" under the root directory to run the desktop app. After the app starts, you can use the key accelerator (Ctrl + Shift + I) to open the chrome dev tools for the app and you may see the error indicating Uncaught (in promise) TypeError: this.$.slots.default is not a function.
Currently we are validating your reported query. we will update you the further details on or before 26th May 2022
Hi,
Thanks much! Please refer to the attached file for the required error-free version using 19.4.54.
Regards,
Arvin
Currently, we are validating your reported query with high priority. we will update you the further details on or before 2nd June 2022.