gd-bs 6.9.19 → 6.9.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/form/index.js +15 -0
- package/build/components/table/index.js +6 -1
- package/dist/gd-bs-icons.js +1 -1
- package/dist/gd-bs-icons.min.js +1 -1
- package/dist/gd-bs.d.ts +4 -1
- package/dist/gd-bs.js +1 -1
- package/dist/gd-bs.min.js +1 -1
- package/package.json +1 -1
- package/src/components/form/formTypes.d.ts +3 -0
- package/src/components/form/index.ts +17 -0
- package/src/components/table/index.ts +5 -1
- package/src/components/table/types.d.ts +1 -1
package/package.json
CHANGED
|
@@ -119,6 +119,9 @@ export interface IForm {
|
|
|
119
119
|
/** Appends rows to the form */
|
|
120
120
|
appendRows: (rows: Array<IFormRow>) => void;
|
|
121
121
|
|
|
122
|
+
/** Clears the validation on the form. */
|
|
123
|
+
clearValidation: () => void;
|
|
124
|
+
|
|
122
125
|
/** The form controls */
|
|
123
126
|
controls: Array<IFormControl>;
|
|
124
127
|
|
|
@@ -110,6 +110,23 @@ class _Form extends Base<IFormProps> implements IForm {
|
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
+
// Clears the validation on the form
|
|
114
|
+
clearValidation() {
|
|
115
|
+
// Find the controls that have been validated
|
|
116
|
+
let controls = this.el.querySelectorAll(".is-valid");
|
|
117
|
+
for (let i = 0; i < controls.length; i++) {
|
|
118
|
+
// Remove the class
|
|
119
|
+
controls[i].classList.remove("is-valid");
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// Find the controls that have been validated
|
|
123
|
+
controls = this.el.querySelectorAll(".is-invalid");
|
|
124
|
+
for (let i = 0; i < controls.length; i++) {
|
|
125
|
+
// Remove the class
|
|
126
|
+
controls[i].classList.remove("is-invalid");
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
113
130
|
// The forms controls
|
|
114
131
|
get controls() {
|
|
115
132
|
let controls: Array<IFormControl> = [];
|
|
@@ -230,9 +230,13 @@ class _Table extends Base<ITableProps> implements ITable {
|
|
|
230
230
|
}
|
|
231
231
|
|
|
232
232
|
// Method to update a row element
|
|
233
|
-
updateRow(elRow: HTMLElement, row: any) {
|
|
233
|
+
updateRow(elRow: HTMLElement, row: any, hiddenColIndexes?: number[]) {
|
|
234
234
|
// Parse the columns
|
|
235
235
|
for (let i = 0; i < this.props.columns.length; i++) {
|
|
236
|
+
// See if this column is hidden
|
|
237
|
+
if (hiddenColIndexes && hiddenColIndexes.indexOf(i) >= 0) { continue; }
|
|
238
|
+
|
|
239
|
+
// Get the column element
|
|
236
240
|
let elCol = elRow.children[i] as HTMLElement;
|
|
237
241
|
if (elCol) {
|
|
238
242
|
// Update the column
|