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. Image for the cookie policy date
close icon

use ejAutoCompleteTextbox in custom-control doesn't work

When we use the Autocomplete Textbox in a custom control the set accessor returns an undefined value after lost the focus.

//set accessor including call the onchange callback
    set value(v: string) {
        if (v !== this.innerValue) {
            this.innerValue = v;
            this.onChangeCallback(this.innerValue);
        }
    }

When Autocomplete lost the focus: v = undefined

Is there a solution?


5 Replies

AP Arun Palaniyandi Syncfusion Team May 8, 2017 12:38 PM UTC

Hi Jürgen,   
   
Thanks for contacting Syncfusion Support.     
   
We have tried your scenario by making a sample with the same, but unfortunately we were unable to reproduce it, but we were able to return value in the set accessor when focusing out the control.   
   
We have shared our sample for your reference below:   
   
Please check our shared sample and if you still have any queries or doubts, get back to us with more information. If possible, use our sample to reproduce your sample issue, so that it will help us provide a solution.   
   
Regards,    
Arun P.    



JN jnord May 10, 2017 09:46 AM UTC

Your example does not work. It hangs.

After you leave the autocomplete control the value is undefinded. In your example you must show the field value after lost the autocomplete box (label).


AP Arun Palaniyandi Syncfusion Team May 11, 2017 12:14 PM UTC

Hi Jürgen, 
 
Thanks for your update. 
 
We have given our sample with the version of 15.1.0.41 and hence this issue is not reproduced from our side. But this issue prevails in our previous releases of 15.1.0.41 version. So, we suggest you to upgrade to our latest Essential Studio version to overcome this issue.  
 

Please let us know if you have any queries.  
 
Regards,  
Arun P.  



JN jnord May 11, 2017 02:26 PM UTC

We have update to Version 15.1.14 and now we have follow error:


vendor.js:81630
Unhandled Promise rejection: Cannot set property 'allowCellMerging' of undefined ; Zone: ; Task: Promise.then ; Value: TypeError: Cannot set property 'allowCellMerging' of undefined
    at eval (/EJAngular2Module/class12/wrapper.ngfactory.js:208:56)

package.json:

{
  "name": "asp.net",
  "version": "1.0.0",
  "description": "",
  "author": "",
  "license": "",
  "dependencies": {
    "@angular/common": "2.4.10",
    "@angular/compiler": "2.4.10",
    "@angular/core": "2.4.10",
    "@angular/forms": "2.4.10",
    "@angular/http": "2.4.10",
    "@angular/platform-browser": "2.4.10",
    "@angular/platform-browser-dynamic": "2.4.10",
    "@angular/platform-server": "2.4.10",
    "@angular/router": "3.4.10",
    "@ng-bootstrap/ng-bootstrap": "1.0.0-alpha.23",
    "alertifyjs": "1.8.0",
    "angular2-platform-node": "2.1.0-rc.1",
    "angular2-universal": "2.1.0-rc.1",
    "angular2-universal-polyfills": "2.1.0-rc.1",
    "aspnet-prerendering": "2.0.3",
    "aspnet-webpack": "1.0.28",
    "bootstrap": "4.0.0-alpha.6",
    "es6-shim": "0.35.1",
    "file-saver": "1.3.3",
    "font-awesome": "4.7.0",
    "isomorphic-fetch": "^2.2.1",
    "jquery": "3.1.1",
    "preboot": "4.5.2",
    "rxjs": "5.2.0",
    "systemjs": "0.19.39",
    "typescript": "2.2.1",
    "zone.js": "0.7.2",
    "moment": "2.18.1"
  },
  "devDependencies": {
    "@types/alertify": "0.3.29",
    "@types/ej.web.all": "15.1.2",
    "@types/file-saver": "0.0.0",
    "@types/jquery": "2.0.34",
    "@types/node": "6.0.38",
    "@types/pdf": "0.0.31",
    "ng-router-loader": "2.1.0",
    "angular-router-loader": "0.5.0",
    "angular2-template-loader": "0.6.2",
    "awesome-typescript-loader": "3.1.2",
    "css": "^2.2.1",
    "css-loader": "0.27.3",
    "expose-loader": "^0.7.1",
    "extract-text-webpack-plugin": "^2.0.0-rc.2",
    "file-loader": "0.9.0",
    "html-loader": "0.4.4",
    "json-loader": "0.5.4",
    "raw-loader": "^0.5.1",
    "sass-loader": "4.1.1",
    "node-sass": "4.5.0",
    "style-loader": "^0.13.0",
    "to-string-loader": "1.1.5",
    "ts-loader": "2.0.3",
    "url-loader": "0.5.7",
    "syncfusion-javascript": "15.1.41",
    "ej-angular2": "15.1.41",
    "webpack": "2.2.1",
    "webpack-externals-plugin": "1.0.0",
    "webpack-hot-middleware": "2.17.1",
    "webpack-merge": "4.1.0"
  }
}

And now ?









AP Arun Palaniyandi Syncfusion Team May 12, 2017 12:23 PM UTC

Hi Jürgen,    
  
Thanks for your update.   
  
We have checked your issue, and that issue has been fixed in our ej-angular2 from the latest version. In order to resolve this, please issue use the below command.   
  
  
npm install ej-angular2@15.2.40 --save   
  
Note: 15.2.40 is our current latest version.   
  
   
Please refer to the below link: https://www.npmjs.com/package/ej-angular2   

We have recorded a video of our sample for your reference below:   

You can also try out our Angular 2 samples using our angular2-seeds hosted in github which will consist of latest versions. https://github.com/syncfusion/angular2-seeds   
  
Please let us know if you have any queries.     
    
Regards,     
Arun P.     


Loader.
Live Chat Icon For mobile
Up arrow icon