CE-798 change style of on-button critetria descriptions (don't say equals or in; only show 1 value for in-lists, then +x)

This commit is contained in:
2024-02-09 15:40:33 -06:00
parent 0ca6f36bc2
commit a5569900b4

View File

@ -400,16 +400,18 @@ export default function QuickFilter({tableMetaData, fullFieldName, fieldMetaData
buttonAdditionalStyles.color = "white !important"; buttonAdditionalStyles.color = "white !important";
buttonClassName = "filterActive"; buttonClassName = "filterActive";
let valuesString = FilterUtils.getValuesString(fieldMetaData, criteria); let valuesString = FilterUtils.getValuesString(fieldMetaData, criteria, 1, "+N");
if(fieldMetaData.type == QFieldType.BOOLEAN)
///////////////////////////////////////////
// don't show the Equals or In operators //
///////////////////////////////////////////
let operatorString = (<>{operatorSelectedValue.label}&nbsp;</>);
if(operatorSelectedValue.value == QCriteriaOperator.EQUALS || operatorSelectedValue.value == QCriteriaOperator.IN)
{ {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////// operatorString = (<></>)
// for booleans, in here, the operator-label is "equals yes" or "equals no", so we don't want the values string //
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
valuesString = "";
} }
buttonContent = (<><span style={{fontWeight: 700}}>{buttonContent}:</span>&nbsp;<span style={{fontWeight: 400}}>{operatorSelectedValue.label}&nbsp;{valuesString}</span></>); buttonContent = (<><span style={{fontWeight: 700}}>{buttonContent}:</span>&nbsp;<span style={{fontWeight: 400}}>{operatorString}{valuesString}</span></>);
} }
const mouseEvents = const mouseEvents =