Fixing the checked variable in radio buttons (#13909)

* Fixing the checked variable in radio buttons

* Emitting the checked state of radio button.

* Adding onChanged event to radioButtons (exposing it)
Deprecating onClick event for radioButtons
Fixing radio button stubs

* Made some type fixes

* Firing event in checked event setter

* updating azdata-test to 1.1 in arc extension

* Some logic fixes in checked setter

* added proper typings and updated package version for azdata-data

* Renamed the event to onDidChangeCheckedState

* Fixed deprecation message

* Fixed broken Schema compare stubs
This commit is contained in:
Aasim Khan
2021-01-07 23:25:21 -08:00
committed by GitHub
parent e7fb44b3a2
commit 5d1b328866
14 changed files with 67 additions and 17 deletions

View File

@@ -16,6 +16,7 @@ export interface ViewTestContext {
export function createViewContext(): ViewTestContext {
let onClick: vscode.EventEmitter<any> = new vscode.EventEmitter<any>();
let onChange: vscode.EventEmitter<boolean> = new vscode.EventEmitter<boolean>();
let apiWrapper = TypeMoq.Mock.ofType(ApiWrapper);
let componentBase: azdata.Component = {
@@ -38,7 +39,8 @@ export function createViewContext(): ViewTestContext {
});
let radioButton: azdata.RadioButtonComponent = Object.assign({}, componentBase, {
checked: true,
onDidClick: onClick.event
onDidClick: onClick.event,
onDidChangeCheckedState: onChange.event,
});
let checkbox: azdata.CheckBoxComponent = Object.assign({}, componentBase, {
checked: true,