userRowSelect don't work on first click
- 主要语言
- TypeScript
- 星标
- 1.6k
- 派生
- 867
- PR 合并指标
- 30 天内没有已合并 PR
描述
It seems that in every first click in the grid, the `userRowSelect` event simply gets ignored. The next clicks (in any rows) work as expected.
No error is fired. This issue happens with any rows (first click in any row don't trigger, then next clicks in any rows start to work normally).
View code
```html
```
Controller code
```ts
export class NiveisListarComponent extends CRUD implements OnInit {
gridSelected;
gridSource: LocalDataSource;
gridData: object[];
settings = Grid.basicConfigWithName();
constructor(
router: Router
) {
super(router);
}
ngOnInit() {
this.getDataFromAPI();
}
handleGridSelected(event) {
this.gridSelected = event.selected[0];
console.log(this.gridSelected);
}
getDataFromAPI() {
this.Request.get(this.URL_CRUD_ENDPOINT)
.then((res) => {
this.gridData = res.data;
this.gridSource = new LocalDataSource(this.gridData);
this.gridSource.refresh();
});
}
}
```
Package.json dependencies (pkg versions)
```json
"dependencies": {
"@angular/common": "^4.0.0",
"@angular/compiler": "^4.0.0",
"@angular/core": "^4.0.0",
"@angular/forms": "^4.0.0",
"@angular/http": "^4.0.0",
"@angular/platform-browser": "^4.0.0",
"@angular/platform-browser-dynamic": "^4.0.0",
"@angular/router": "^4.0.0",
"angular-2-dropdown-multiselect": "^1.4.2",
"animate.css": "^3.5.2",
"axios": "^0.16.2",
"core-js": "^2.4.1",
"diacritics": "^1.3.0",
"ng2-smart-table": "^1.2.1",
"tinymce": "^4.6.4"
},
"devDependencies": {
"@angular/cli": "^1.2.1",
"@angular/compiler-cli": "^4.0.0",
"@types/jasmine": "2.5.38",
"@types/node": "~6.0.60",
"codelyzer": "~2.0.0",
"jasmine-core": "~2.5.2",
"jasmine-spec-reporter": "~3.2.0",
"jeet": "^7.1.0",
"karma": "~1.4.1",
"karma-chrome-launcher": "~2.0.0",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^0.2.0",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"node-sass": "^4.5.3",
"protractor": "~5.1.0",
"sass-loader": "^6.0.5",
"ts-node": "~2.0.0",
"tslint": "~4.5.0",
"typescript": "~2.2.0"
}
```
### Visual reproduction of the bug:
*(First click don't fire the event, then next clicks work normally)*

贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。