mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
committed by
Eugenio Romano
parent
72ae760b85
commit
ea7df8ac22
@@ -205,6 +205,7 @@ describe('DisplayValueWidget', () => {
|
|||||||
it('should setup [DROPDOWN] field with REST config', () => {
|
it('should setup [DROPDOWN] field with REST config', () => {
|
||||||
widget.field = new FormFieldModel(null, {
|
widget.field = new FormFieldModel(null, {
|
||||||
type: FormFieldTypes.DISPLAY_VALUE,
|
type: FormFieldTypes.DISPLAY_VALUE,
|
||||||
|
restUrl: 'http://test.com',
|
||||||
params: {
|
params: {
|
||||||
field: {
|
field: {
|
||||||
type: FormFieldTypes.DROPDOWN
|
type: FormFieldTypes.DROPDOWN
|
||||||
|
@@ -96,7 +96,11 @@ export class DisplayValueWidget extends WidgetComponent implements OnInit {
|
|||||||
this.loadRestFieldValue();
|
this.loadRestFieldValue();
|
||||||
break;
|
break;
|
||||||
case FormFieldTypes.DROPDOWN:
|
case FormFieldTypes.DROPDOWN:
|
||||||
|
if (this.field.restUrl) {
|
||||||
this.loadRestFieldValue();
|
this.loadRestFieldValue();
|
||||||
|
} else {
|
||||||
|
this.value = this.field.value;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case FormFieldTypes.RADIO_BUTTONS:
|
case FormFieldTypes.RADIO_BUTTONS:
|
||||||
if (this.field.restUrl) {
|
if (this.field.restUrl) {
|
||||||
@@ -207,6 +211,7 @@ export class DisplayValueWidget extends WidgetComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getCellValue(row: DynamicTableRow, column: DynamicTableColumn): any {
|
getCellValue(row: DynamicTableRow, column: DynamicTableColumn): any {
|
||||||
|
|
||||||
let result = row.value[column.id];
|
let result = row.value[column.id];
|
||||||
|
|
||||||
if (column.type === 'Dropdown') {
|
if (column.type === 'Dropdown') {
|
||||||
|
Reference in New Issue
Block a user