mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-23 17:23:02 -05:00
fix chart's checkbox option type (#15014)
* fix chart's checkbox option type * overwrite the useragent margin for checkbox
This commit is contained in:
@@ -317,11 +317,13 @@ export class ChartView extends Disposable implements IPanelView {
|
||||
}
|
||||
|
||||
private createOption(option: IChartOption, container: HTMLElement) {
|
||||
const label = DOM.$('div.option-label');
|
||||
label.innerText = option.label;
|
||||
const optionContainer = DOM.$('div.option-container');
|
||||
const optionInput = DOM.$('div.option-input');
|
||||
optionContainer.appendChild(label);
|
||||
if (option.type !== ControlType.checkbox) {
|
||||
const label = DOM.$('div.option-label');
|
||||
label.innerText = option.label;
|
||||
optionContainer.appendChild(label);
|
||||
}
|
||||
optionContainer.appendChild(optionInput);
|
||||
let setFunc: ((val: string) => void) | ((val: number) => void) | ((val: boolean) => void);
|
||||
let entry = option.configEntry as keyof IInsightOptions;
|
||||
@@ -329,7 +331,7 @@ export class ChartView extends Disposable implements IPanelView {
|
||||
switch (option.type) {
|
||||
case ControlType.checkbox:
|
||||
let checkbox = new Checkbox(optionInput, {
|
||||
label: '',
|
||||
label: option.label,
|
||||
ariaLabel: option.label,
|
||||
checked: value,
|
||||
onChange: () => {
|
||||
|
||||
@@ -31,3 +31,7 @@
|
||||
min-width: 250px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
.option-container {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user