Add plain string control with formatter.

pull/58/head
Aditya Toshniwal 2021-08-10 14:37:43 +05:30 committed by Akshay Joshi
parent f742c5eb8a
commit 314fcabbeb
2 changed files with 4 additions and 3 deletions

View File

@ -80,6 +80,7 @@ const useStyles = makeStyles((theme)=>({
position: 'relative',
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
},
tableCellHeader: {
fontWeight: theme.typography.fontWeightBold,

View File

@ -11,7 +11,7 @@ import React, { useCallback } from 'react';
import _ from 'lodash';
import { FormInputText, FormInputSelect, FormInputSwitch, FormInputCheckbox, FormInputColor,
FormInputFileSelect, FormInputToggle, InputSwitch, FormInputSQL, FormNote, FormInputDateTimePicker } from '../components/FormComponents';
FormInputFileSelect, FormInputToggle, InputSwitch, FormInputSQL, FormNote, FormInputDateTimePicker, PlainString } from '../components/FormComponents';
import { InputSelect, InputText, InputCheckbox, InputDateTimePicker } from '../components/FormComponents';
import Privilege from '../components/Privilege';
import { evalFunc } from 'sources/utils';
@ -100,7 +100,7 @@ function MappedFormControlBase({type, value, id, onChange, className, visible, i
case 'datetimepicker':
return <FormInputDateTimePicker name={name} value={value} onChange={onTextChange} className={className} {...props} />;
default:
return <span>{value}</span>;
return <PlainString value={value} {...props} />;
}
}
@ -189,7 +189,7 @@ function MappedCellControlBase({cell, value, id, optionsLoaded, onCellChange, vi
case 'datetimepicker':
return <InputDateTimePicker name={name} value={value} onChange={onTextChange} {...props}/>;
default:
return <span>{value}</span>;
return <PlainString value={value} {...props} />;
}
}