We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Autocomplete Component in Custom Editor Template

Thread ID:

Created:

Updated:

Platform:

Replies:

146329 Jul 31,2019 02:13 PM UTC Aug 6,2019 04:27 AM UTC React - EJ 2 6
loading
Tags: Schedule
Matthew
Asked On July 31, 2019 02:13 PM UTC

I am having an issue using the Autocomplete component inside an editor template for the Scheduler Component. Its my understanding that all "input" fields in the editor template must have className="e-field". However passing this into the Autocomplete Component inside the editor template causes an error, message: 'Uncaught DOMException: Failed to execute 'closest' on 'Element': '.' is not a valid selector'

If className is not passed through, no error is thrown the event is not updated. Please could you advise on how to get the Autocomplete component working with a custom editor template in the scheduler


Matthew
Replied On July 31, 2019 02:17 PM UTC

See attached for example snippet to reproduce 

Attachment: editor_template_autocomplete_45804cc7.zip

Karthigeyan Krishnamurthi [Syncfusion]
Replied On August 1, 2019 09:44 AM UTC

Hi Matthew 
 
Syncfusion greetings. 
 
We provided the e-field support only for limited JS2 Syncfusion components like datepicker, datetimepicker, dropdownlist, multiselect, checkbox and input components . For other JS2 components, we have to handle the ‘get, set value’ in sample end using actionBegin and popupOpen events like below. 
 
onPopupOpen(args) { 
      if(args.type=='Editor'){ 
          this.listObj.value = args.data.Game || null 
      } 
    } 
    onActionBegin(args) { 
        if (args.requestType === 'eventCreate') { 
          args.data[0].Game = this.listObj.value; 
        } 
        if(args.requestType === 'eventChange') { 
          args.data.Game = this.listObj.value; 
        } 
    } 
 
Regards, 
Karthi 
 


Matthew
Replied On August 1, 2019 10:26 AM UTC

Hi, Thanks for that. I am using resource grouping but when I click save the onActionBegin and onActionComplete events are not being triggered? If I take the AutoComplete/DropdownList components out of the editor templete they are then triggered. Do you know why this might be?

Karthigeyan Krishnamurthi [Syncfusion]
Replied On August 2, 2019 10:19 AM UTC

Hi Matthew, 
 
Thanks for the update. 
 
In your sample, resource field may not be included in custom editor which could be the cause. We have prepared the below sample for your reference, kindly check it. 
  
Regards, 
Karthi 


Matthew
Replied On August 5, 2019 04:00 PM UTC

Hi, Thanks for you help, I have got it working now :)

Karthigeyan Krishnamurthi [Syncfusion]
Replied On August 6, 2019 04:27 AM UTC

Most welcome 😊 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon