ng-lightning

ng-lightning - data object is undefined on lookup

◇◆丶佛笑我妖孽 提交于 2019-12-31 04:28:10
问题 I'm working with the Lookup component and am getting an error that my data object is undefined and thus cannot .filter(). Code is below: getAllAccounts() { this._quickAddService.getAllAccounts() .subscribe( accounts => this.getAllAccountsFinished(accounts), error => this.errorMessage = <any>error); } getAllAccountsFinished(accounts:any) { this.accounts = accounts; console.log(this.accounts); this.hideSpinner(); } ngOnInit(){ this.getAllAccounts(); } lookup(query: string): Account[] { if (

ng-lightning modal window not displaying 'x' on the close option

六月ゝ 毕业季﹏ 提交于 2019-12-25 09:11:30
问题 I have a modal working in an example todos app that i'm working on, however the 'x' in the top right hand corner isn't displaying correctly. The console is throwing an error saying it can't find localhost:3000/assets/icons{etc...} but that directory in this project exists at localhost:3000/bower_components/salesforce-lightning-design-system/assetx{etc}. See screeny.. Wondering how I can get that to point to the right place? It's not defined in the html markup... Markup: <div class="slds-no

ng-lightning - data object is undefined on lookup

半世苍凉 提交于 2019-12-02 07:04:01
I'm working with the Lookup component and am getting an error that my data object is undefined and thus cannot .filter(). Code is below: getAllAccounts() { this._quickAddService.getAllAccounts() .subscribe( accounts => this.getAllAccountsFinished(accounts), error => this.errorMessage = <any>error); } getAllAccountsFinished(accounts:any) { this.accounts = accounts; console.log(this.accounts); this.hideSpinner(); } ngOnInit(){ this.getAllAccounts(); } lookup(query: string): Account[] { if (!query) { return null; } return this.accounts.filter((item) => item.name.toLowerCase().indexOf(query