mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 08:58:26 +00:00
change position of cell background color option in column properties (#4891)
* fixed #4838 * Removed extra input field
This commit is contained in:
parent
742d2b9887
commit
55c783064e
1 changed files with 18 additions and 17 deletions
|
|
@ -256,6 +256,7 @@ class TableComponent extends React.Component {
|
|||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
{(column.columnType === 'string' || column.columnType === undefined || column.columnType === 'default') && (
|
||||
<div>
|
||||
|
|
@ -277,6 +278,23 @@ class TableComponent extends React.Component {
|
|||
}}
|
||||
/>
|
||||
</div>
|
||||
<div className="field mb-2">
|
||||
<label className="form-label">{this.props.t('widget.Table.cellBgColor', 'Cell Background Color')}</label>
|
||||
<CodeHinter
|
||||
currentState={this.props.currentState}
|
||||
initialValue={column.cellBackgroundColor ?? 'inherit'}
|
||||
theme={this.props.darkMode ? 'monokai' : 'default'}
|
||||
mode="javascript"
|
||||
lineNumbers={false}
|
||||
placeholder={''}
|
||||
onChange={(value) => this.onColumnItemChange(index, 'cellBackgroundColor', value)}
|
||||
componentName={this.getPopoverFieldSource(column.columnType, 'cellBackgroundColor')}
|
||||
popOverCallback={(showing) => {
|
||||
this.setColumnPopoverRootCloseBlocker('cellBackgroundColor', showing);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{column.isEditable && (
|
||||
<div>
|
||||
<div data-cy={`header-validation`} className="hr-text">
|
||||
|
|
@ -490,23 +508,6 @@ class TableComponent extends React.Component {
|
|||
</>
|
||||
)}
|
||||
|
||||
<div data-cy={`input-and-label-cell-bg-color`} className="field mb-2">
|
||||
<label className="form-label">{this.props.t('widget.Table.cellBgColor', 'Cell Background Color')}</label>
|
||||
<CodeHinter
|
||||
currentState={this.props.currentState}
|
||||
initialValue={column.cellBackgroundColor ?? 'inherit'}
|
||||
theme={this.props.darkMode ? 'monokai' : 'default'}
|
||||
mode="javascript"
|
||||
lineNumbers={false}
|
||||
placeholder={''}
|
||||
onChange={(value) => this.onColumnItemChange(index, 'cellBackgroundColor', value)}
|
||||
componentName={this.getPopoverFieldSource(column.columnType, 'cellBackgroundColor')}
|
||||
popOverCallback={(showing) => {
|
||||
this.setColumnPopoverRootCloseBlocker('cellBackgroundColor', showing);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{column.columnType === 'datepicker' && (
|
||||
<div>
|
||||
<label data-cy={`label-date-display-format`} className="form-label">
|
||||
|
|
|
|||
Loading…
Reference in a new issue