Fix schema compare include/exclude behavior (#8042)

* don't uncheck difference if unsuccessful

* changes after rebasing to get schema compare fix

* First cut of column checkbox checking reactive to include opteration

* handle blocking dependencies and affected dependencies

* Changing the checked property of table to be list

* Addressing comments

* add map to keep row number of diff entries

* remove findDifferenceRow() since it isn't needed anymore

* fix scrolling to the top when checking/unchecking and add info message

* change checked to updateCells

* improve warning cannot include/exclude message
This commit is contained in:
Kim Santiago
2019-10-29 11:55:31 -07:00
committed by GitHub
parent 5629356c66
commit ce5eb00177
9 changed files with 135 additions and 8 deletions

View File

@@ -26,6 +26,7 @@ import { Emitter, Event as vsEvent } from 'vs/base/common/event';
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
import { KeyMod, KeyCode } from 'vs/base/common/keyCodes';
import { slickGridDataItemColumnValueWithNoData, textFormatter } from 'sql/base/browser/ui/table/formatters';
import { isNullOrUndefined } from 'util';
@Component({
selector: 'modelview-table',
@@ -255,10 +256,27 @@ export default class TableComponent extends ComponentBase implements IComponent,
this._table.focus();
}
if (this.updateCells !== undefined) {
this.updateTableCells(this.updateCells);
}
this.layoutTable();
this.validate();
}
private updateTableCells(cellInfos): void {
cellInfos.forEach((cellInfo) => {
if (isNullOrUndefined(cellInfo.column) || isNullOrUndefined(cellInfo.row) || cellInfo.row < 0 || cellInfo.row > this.data.length) {
return;
}
const checkInfo: azdata.CheckBoxCell = cellInfo as azdata.CheckBoxCell;
if (checkInfo) {
this._checkboxColumns[checkInfo.columnName].reactiveCheckboxCheck(checkInfo.row, checkInfo.checked);
}
});
}
private createCheckBoxPlugin(col: any, index: number) {
let name = col.value;
if (!this._checkboxColumns[col.value]) {
@@ -357,4 +375,12 @@ export default class TableComponent extends ComponentBase implements IComponent,
public set focused(newValue: boolean) {
this.setPropertyFromUI<azdata.RadioButtonProperties, boolean>((properties, value) => { properties.focused = value; }, newValue);
}
public get updateCells(): azdata.TableCell[] {
return this.getPropertyOrDefault<azdata.TableComponentProperties, azdata.TableCell[]>((props) => props.updateCells, undefined);
}
public set updateCells(newValue: azdata.TableCell[]) {
this.setPropertyFromUI<azdata.TableComponentProperties, azdata.TableCell[]>((properties, value) => { properties.updateCells = value; }, newValue);
}
}