Skip to content

Commit

Permalink
4001 - Highlight only non text input calculated cells
Browse files Browse the repository at this point in the history
  • Loading branch information
yaguzmang committed Jan 1, 2025
1 parent c171b04 commit 8e1c5c2
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const useClassName = (props: Props): string => {
const { colType } = col.props

const isPlaceholder = colType === ColType.placeholder
const isLeftAligned = [ColType.text, ColType.textarea, ColType.select, ColType.taxon].includes(colType)
const isTextInput = [ColType.text, ColType.textarea, ColType.select, ColType.taxon].includes(colType)
const isCalculated = Cols.isCalculated({ col, row })
const isCalculatedInput = isCalculated && colType !== ColType.calculated
const isReadOnly = Cols.isReadOnly({ cycle, col, row }) && !isCalculatedInput
Expand All @@ -27,9 +27,9 @@ export const useClassName = (props: Props): string => {
'table-grid__data-cell',
{ 'validation-error': !validation.valid },
{
'calculated-input': isCalculatedInput,
'calculated-input': isCalculatedInput && !isTextInput,
'category header left': isPlaceholder,
left: isLeftAligned,
left: isTextInput,
readonly: isReadOnly,
}
)
Expand Down

0 comments on commit 8e1c5c2

Please sign in to comment.