Added check all nulls to modify column Page (#10683) (#10751)

* -Added check all null checkbox

* Modified declarative table to add check all columns  in the column header

* -changed to using existing methods for firing events.

* -changed table height to auto
-center aligned data in table cell
-Check all generates event for only changed values

* -changes column header from text to column header (#10787)

* This fixes the weird angular stuff - we need to do this in every other component

* -added changes made by amir for dom object tracking
-added automatic checkall detection.
-made text-align center in table cells

* -fixed styling issues and issue with checkboxes

* -Removed unsued function

Co-authored-by: Amir Omidi <amomidi@microsoft.com>
This commit is contained in:
Aasim Khan
2020-06-26 19:02:59 -07:00
committed by GitHub
parent 9dc7ca056f
commit a9848a7a96
6 changed files with 74 additions and 34 deletions

View File

@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import * as azdata from 'azdata';
import { ColumnMetadata } from '../api/models';
import { ColumnMetadata, ColumnMetadataArray } from '../api/models';
import { ImportPage } from '../api/importPage';
import * as constants from '../../common/constants';
@@ -121,14 +121,13 @@ export class ModifyColumnsPage extends ImportPage {
}
private async populateTable() {
let data: any[][] = [];
let data: ColumnMetadataArray[] = [];
this.model.proseColumns.forEach((column) => {
data.push(ModifyColumnsPage.convertMetadata(column));
});
this.table.updateProperties({
height: 400,
columns: [{
displayName: constants.columnNameText,
valueType: azdata.DeclarativeDataType.string,
@@ -144,17 +143,16 @@ export class ModifyColumnsPage extends ImportPage {
displayName: constants.primaryKeyText,
valueType: azdata.DeclarativeDataType.boolean,
width: '100px',
isReadOnly: false
isReadOnly: false,
showCheckAll: true
}, {
displayName: constants.allowNullsText,
valueType: azdata.DeclarativeDataType.boolean,
isReadOnly: false,
width: '100px'
width: '100px',
showCheckAll: true
}],
data: data
});
}
}