fix issue that user is not able to interact with checkbox in declarative table using keyboard (#14863)

* handle space key press

* correct fix
This commit is contained in:
Alan Ren
2021-03-24 19:07:12 -07:00
committed by GitHub
parent 2b7535f377
commit f12c8cd5d3
2 changed files with 4 additions and 10 deletions

View File

@@ -331,6 +331,10 @@ export default class DeclarativeTableComponent extends ContainerBase<any, azdata
}
public onKey(e: KeyboardEvent, row: number) {
// Ignore the bubble up events
if (e.target !== e.currentTarget) {
return;
}
const event = new StandardKeyboardEvent(e);
if (event.equals(KeyCode.Enter) || event.equals(KeyCode.Space)) {
this.onRowSelected(row);