@den4ik92/ng2-smart-table 19.5.3 → 19.5.4
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.
|
@@ -346,13 +346,13 @@ class Cell {
|
|
|
346
346
|
this.value = value;
|
|
347
347
|
this.row = row;
|
|
348
348
|
this.column = column;
|
|
349
|
-
this.newValue =
|
|
349
|
+
this.newValue = signal(null);
|
|
350
350
|
this.columnClass = '';
|
|
351
351
|
this.styles = '';
|
|
352
352
|
this.title = '';
|
|
353
353
|
this.id = '';
|
|
354
354
|
this.columnClass = column.class;
|
|
355
|
-
this.newValue
|
|
355
|
+
this.newValue.set(value);
|
|
356
356
|
this.styles = column.styles;
|
|
357
357
|
this.title = column.title;
|
|
358
358
|
this.id = column.id;
|
|
@@ -364,8 +364,8 @@ class Cell {
|
|
|
364
364
|
getNotPrepareValue() {
|
|
365
365
|
return this.value;
|
|
366
366
|
}
|
|
367
|
-
|
|
368
|
-
this.newValue
|
|
367
|
+
setNewValue(value) {
|
|
368
|
+
this.newValue.set(value);
|
|
369
369
|
}
|
|
370
370
|
isEditable() {
|
|
371
371
|
if (this.row.index === -1) {
|
|
@@ -447,7 +447,7 @@ class Row {
|
|
|
447
447
|
}
|
|
448
448
|
getNewData() {
|
|
449
449
|
const values = Object.assign({}, this.rowData);
|
|
450
|
-
this.cells().forEach((cell) => (values[cell.column.id] = cell.newValue));
|
|
450
|
+
this.cells().forEach((cell) => (values[cell.column.id] = cell.newValue()));
|
|
451
451
|
return values;
|
|
452
452
|
}
|
|
453
453
|
setData(rowData) {
|
|
@@ -834,7 +834,7 @@ class CheckboxEditorComponent extends BaseEditorComponent {
|
|
|
834
834
|
});
|
|
835
835
|
}
|
|
836
836
|
onChange(event) {
|
|
837
|
-
this.cell().
|
|
837
|
+
this.cell().setNewValue(event.target.checked ? this.trueVal() : this.falseVal());
|
|
838
838
|
}
|
|
839
839
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: CheckboxEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
840
840
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: CheckboxEditorComponent, isStandalone: true, selector: "ng2-checkbox-editor", usesInheritance: true, ngImport: i0, template: `
|
|
@@ -869,7 +869,8 @@ class InputEditorComponent extends BaseEditorComponent {
|
|
|
869
869
|
type="text"
|
|
870
870
|
[class]="inputClass()"
|
|
871
871
|
class="form-control"
|
|
872
|
-
[
|
|
872
|
+
[ngModel]="cell().newValue()"
|
|
873
|
+
(ngModelChange)="cell().setNewValue($event)"
|
|
873
874
|
[name]="cell().id"
|
|
874
875
|
[placeholder]="cell().title"
|
|
875
876
|
[disabled]="!cell().isEditable()" />
|
|
@@ -882,7 +883,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
882
883
|
type="text"
|
|
883
884
|
[class]="inputClass()"
|
|
884
885
|
class="form-control"
|
|
885
|
-
[
|
|
886
|
+
[ngModel]="cell().newValue()"
|
|
887
|
+
(ngModelChange)="cell().setNewValue($event)"
|
|
886
888
|
[name]="cell().id"
|
|
887
889
|
[placeholder]="cell().title"
|
|
888
890
|
[disabled]="!cell().isEditable()" />
|
|
@@ -895,7 +897,8 @@ class SelectEditorComponent extends BaseEditorComponent {
|
|
|
895
897
|
<select
|
|
896
898
|
[class]="inputClass()"
|
|
897
899
|
class="form-control"
|
|
898
|
-
[
|
|
900
|
+
[ngModel]="cell().newValue()"
|
|
901
|
+
(ngModelChange)="cell().setNewValue($event)"
|
|
899
902
|
[name]="cell().id"
|
|
900
903
|
[disabled]="!cell().isEditable()">
|
|
901
904
|
@for (option of cell().column.getEditorConfig()?.list; track $index) {
|
|
@@ -914,7 +917,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
914
917
|
<select
|
|
915
918
|
[class]="inputClass()"
|
|
916
919
|
class="form-control"
|
|
917
|
-
[
|
|
920
|
+
[ngModel]="cell().newValue()"
|
|
921
|
+
(ngModelChange)="cell().setNewValue($event)"
|
|
918
922
|
[name]="cell().id"
|
|
919
923
|
[disabled]="!cell().isEditable()">
|
|
920
924
|
@for (option of cell().column.getEditorConfig()?.list; track $index) {
|
|
@@ -935,7 +939,8 @@ class TextareaEditorComponent extends BaseEditorComponent {
|
|
|
935
939
|
<textarea
|
|
936
940
|
[class]="inputClass()"
|
|
937
941
|
class="form-control"
|
|
938
|
-
[
|
|
942
|
+
[ngModel]="cell().newValue()"
|
|
943
|
+
(ngModelChange)="cell().setNewValue($event)"
|
|
939
944
|
[name]="cell().id"
|
|
940
945
|
[disabled]="!cell().isEditable()"
|
|
941
946
|
[placeholder]="cell().title">
|
|
@@ -948,7 +953,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
948
953
|
<textarea
|
|
949
954
|
[class]="inputClass()"
|
|
950
955
|
class="form-control"
|
|
951
|
-
[
|
|
956
|
+
[ngModel]="cell().newValue()"
|
|
957
|
+
(ngModelChange)="cell().setNewValue($event)"
|
|
952
958
|
[name]="cell().id"
|
|
953
959
|
[disabled]="!cell().isEditable()"
|
|
954
960
|
[placeholder]="cell().title">
|