mirror of
https://github.com/Kingsrook/qqq-frontend-material-dashboard.git
synced 2025-07-17 21:00:45 +00:00
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:
@ -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} </>);
|
||||||
|
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> <span style={{fontWeight: 400}}>{operatorSelectedValue.label} {valuesString}</span></>);
|
buttonContent = (<><span style={{fontWeight: 700}}>{buttonContent}:</span> <span style={{fontWeight: 400}}>{operatorString}{valuesString}</span></>);
|
||||||
}
|
}
|
||||||
|
|
||||||
const mouseEvents =
|
const mouseEvents =
|
||||||
|
Reference in New Issue
Block a user