fix(record-picker): get label from value
This commit is contained in:
		
							parent
							
								
									a19a18b1f7
								
							
						
					
					
						commit
						4a7b32b5e7
					
				| @ -21,6 +21,10 @@ export const getDatePickerLabels = (props): string => { | ||||
| }; | ||||
| 
 | ||||
| export const getLabelFormatValue = (labelUiSchema: ISchema, value: any): string => { | ||||
|   if (Array.isArray(labelUiSchema?.enum) && value) { | ||||
|     const opt: any = labelUiSchema.enum.find((option: any) => option.value === value); | ||||
|     return opt?.label; | ||||
|   } | ||||
|   switch (labelUiSchema?.['x-component']) { | ||||
|     case 'DatePicker': | ||||
|       return getDatePickerLabels({ ...labelUiSchema?.['x-component-props'], value }); | ||||
|  | ||||
| @ -32,8 +32,9 @@ export default class extends Migration { | ||||
|       const repository = db.getRepository('applicationPlugins'); | ||||
|       await repository.destroy({ | ||||
|         filter: { | ||||
|           'name.$in': ['math-formula-field', 'excel-formula-field'], | ||||
|           name: ['math-formula-field', 'excel-formula-field'], | ||||
|         }, | ||||
|         transaction, | ||||
|       }); | ||||
|     }); | ||||
|   } | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user