+
{
- chips.map((item, i) => (
+ chips.map((item, index) => (
-
))
}
,
@@ -158,6 +249,7 @@ function ChipTextField({...props})
);
}
+
ChipTextField.defaultProps = {
chipData: []
};
@@ -166,4 +258,4 @@ ChipTextField.propTypes = {
chipData: arrayOf(string)
};
-export default ChipTextField
+export default ChipTextField;
diff --git a/src/qqq/components/forms/DynamicFormField.tsx b/src/qqq/components/forms/DynamicFormField.tsx
index 8112dc1..758836c 100644
--- a/src/qqq/components/forms/DynamicFormField.tsx
+++ b/src/qqq/components/forms/DynamicFormField.tsx
@@ -20,17 +20,18 @@
*/
import {QPossibleValue} from "@kingsrook/qqq-frontend-core/lib/model/QPossibleValue";
-import {Box, InputAdornment, InputLabel} from "@mui/material";
+import {InputAdornment, InputLabel} from "@mui/material";
+import Box from "@mui/material/Box";
import Switch from "@mui/material/Switch";
import {ErrorMessage, Field, useFormikContext} from "formik";
-import DynamicFormUtils from "qqq/components/forms/DynamicFormUtils";
-import DynamicSelect from "qqq/components/forms/DynamicSelect";
-import React, {useMemo, useState} from "react";
-import AceEditor from "react-ace";
import colors from "qqq/assets/theme/base/colors";
import BooleanFieldSwitch from "qqq/components/forms/BooleanFieldSwitch";
+import DynamicFormUtils from "qqq/components/forms/DynamicFormUtils";
+import DynamicSelect from "qqq/components/forms/DynamicSelect";
import MDInput from "qqq/components/legacy/MDInput";
import MDTypography from "qqq/components/legacy/MDTypography";
+import React, {useMemo, useState} from "react";
+import AceEditor from "react-ace";
import {flushSync} from "react-dom";
// Declaring props types for FormField
@@ -83,10 +84,10 @@ function QDynamicFormField({
if (placeholder)
{
- inputProps.placeholder = placeholder
+ inputProps.placeholder = placeholder;
}
- if(backgroundColor)
+ if (backgroundColor)
{
inputProps.sx = {
"&.MuiInputBase-root": {
@@ -124,7 +125,7 @@ function QDynamicFormField({
{
onChange.onChange = (e: any) =>
{
- if(isToUpperCase || isToLowerCase)
+ if (isToUpperCase || isToLowerCase)
{
const beforeStart = e.target.selectionStart;
const beforeEnd = e.target.selectionEnd;
@@ -141,7 +142,7 @@ function QDynamicFormField({
newValue = newValue.toLowerCase();
}
setFieldValue(name, newValue);
- if(onChangeCallback)
+ if (onChangeCallback)
{
onChangeCallback(newValue);
}
@@ -153,7 +154,7 @@ function QDynamicFormField({
input.setSelectionRange(beforeStart, beforeEnd);
}
}
- else if(onChangeCallback)
+ else if (onChangeCallback)
{
onChangeCallback(e.currentTarget.value);
}
@@ -165,15 +166,15 @@ function QDynamicFormField({
***************************************************************************/
function dynamicSelectOnChange(newValue?: QPossibleValue)
{
- if(onChangeCallback)
+ if (onChangeCallback)
{
- onChangeCallback(newValue == null ? null : newValue.id)
+ onChangeCallback(newValue == null ? null : newValue.id);
}
}
let field;
let getsBulkEditHtmlLabel = true;
- if(formFieldObject.possibleValueProps)
+ if (formFieldObject.possibleValueProps)
{
field = (
)
+ />);
}
else if (type === "checkbox")
{
@@ -220,7 +221,7 @@ function QDynamicFormField({
onChange={(value: string, event: any) =>
{
setFieldValue(name, value, false);
- if(onChangeCallback)
+ if (onChangeCallback)
{
onChangeCallback(value);
}
diff --git a/src/qqq/components/forms/DynamicSelect.tsx b/src/qqq/components/forms/DynamicSelect.tsx
index b849779..31391d9 100644
--- a/src/qqq/components/forms/DynamicSelect.tsx
+++ b/src/qqq/components/forms/DynamicSelect.tsx
@@ -174,7 +174,7 @@ function DynamicSelect({fieldPossibleValueProps, overrideId, name, fieldLabel, i
const filterInlinePossibleValues = (searchTerm: string, possibleValues: QPossibleValue[]): QPossibleValue[] =>
{
return possibleValues.filter(pv => pv.label?.toLowerCase().startsWith(searchTerm));
- }
+ };
/***************************************************************************
@@ -182,15 +182,15 @@ function DynamicSelect({fieldPossibleValueProps, overrideId, name, fieldLabel, i
***************************************************************************/
const loadResults = async (): Promise
=>
{
- if(possibleValues)
+ if (possibleValues)
{
- return filterInlinePossibleValues(searchTerm, possibleValues)
+ return filterInlinePossibleValues(searchTerm, possibleValues);
}
else
{
- return await qController.possibleValues(tableName, processName, possibleValueSourceName ?? fieldName, searchTerm ?? "", null, otherValues, useCase);
+ return await qController.possibleValues(tableName, processName, possibleValueSourceName ?? fieldName, searchTerm ?? "", null, null, otherValues, useCase);
}
- }
+ };
/***************************************************************************
diff --git a/src/qqq/components/forms/EntityForm.tsx b/src/qqq/components/forms/EntityForm.tsx
index 6360250..e115732 100644
--- a/src/qqq/components/forms/EntityForm.tsx
+++ b/src/qqq/components/forms/EntityForm.tsx
@@ -184,9 +184,9 @@ function EntityForm(props: Props): JSX.Element
///////////////////////////////////////////////////////////////////////////////////////
// copy values from specified fields in the parent record down into the child record //
///////////////////////////////////////////////////////////////////////////////////////
- if(widgetData.defaultValuesForNewChildRecordsFromParentFields)
+ if (widgetData.defaultValuesForNewChildRecordsFromParentFields)
{
- for(let childField in widgetData.defaultValuesForNewChildRecordsFromParentFields)
+ for (let childField in widgetData.defaultValuesForNewChildRecordsFromParentFields)
{
const parentField = widgetData.defaultValuesForNewChildRecordsFromParentFields[childField];
defaultValues[childField] = formValues[parentField];
@@ -278,21 +278,21 @@ function EntityForm(props: Props): JSX.Element
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// build a map of display values for the new record, specifically, for any possible-values that need translated. //
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- const displayValues: {[fieldName: string]: string} = {};
- if(childTableName && values)
+ const displayValues: { [fieldName: string]: string } = {};
+ if (childTableName && values)
{
///////////////////////////////////////////////////////////////////////////////////////////////////////
// this function internally memoizes, so, we could potentially avoid an await here, but, seems ok... //
///////////////////////////////////////////////////////////////////////////////////////////////////////
- const childTableMetaData = await qController.loadTableMetaData(childTableName)
+ const childTableMetaData = await qController.loadTableMetaData(childTableName);
for (let key in values)
{
const value = values[key];
const field = childTableMetaData.fields.get(key);
- if(field.possibleValueSourceName)
+ if (field.possibleValueSourceName)
{
- const possibleValues = await qController.possibleValues(childTableName, null, field.name, null, [value], objectToMap(values), "form")
- if(possibleValues && possibleValues.length > 0)
+ const possibleValues = await qController.possibleValues(childTableName, null, field.name, null, [value], null, objectToMap(values), "form");
+ if (possibleValues && possibleValues.length > 0)
{
displayValues[key] = possibleValues[0].label;
}
@@ -516,13 +516,12 @@ function EntityForm(props: Props): JSX.Element
}
-
/***************************************************************************
**
***************************************************************************/
function objectToMap(object: { [key: string]: any }): Map
{
- if(object == null)
+ if (object == null)
{
return (null);
}
@@ -532,7 +531,7 @@ function EntityForm(props: Props): JSX.Element
{
rs.set(key, object[key]);
}
- return rs
+ return rs;
}
@@ -667,7 +666,7 @@ function EntityForm(props: Props): JSX.Element
const defaultValue = (defaultValues && defaultValues[fieldName]) ? defaultValues[fieldName] : fieldMetaData.defaultValue;
if (defaultValue && fieldMetaData.possibleValueSourceName)
{
- const results: QPossibleValue[] = await qController.possibleValues(tableName, null, fieldName, null, [initialValues[fieldName]], objectToMap(initialValues), "form");
+ const results: QPossibleValue[] = await qController.possibleValues(tableName, null, fieldName, null, [initialValues[fieldName]], null, objectToMap(initialValues), "form");
if (results && results.length > 0)
{
defaultDisplayValues.set(fieldName, results[0].label);
diff --git a/src/qqq/components/processes/BulkLoadFileMappingField.tsx b/src/qqq/components/processes/BulkLoadFileMappingField.tsx
index b5457b3..3023f0b 100644
--- a/src/qqq/components/processes/BulkLoadFileMappingField.tsx
+++ b/src/qqq/components/processes/BulkLoadFileMappingField.tsx
@@ -26,7 +26,6 @@ import Autocomplete from "@mui/material/Autocomplete";
import Box from "@mui/material/Box";
import Button from "@mui/material/Button";
import Icon from "@mui/material/Icon";
-import IconButton from "@mui/material/IconButton";
import RadioGroup from "@mui/material/RadioGroup";
import TextField from "@mui/material/TextField";
import {useFormikContext} from "formik";
@@ -94,7 +93,7 @@ export default function BulkLoadFileMappingField({bulkLoadField, isRequired, rem
// deal with dynamically loading the initial default value for a possible value... //
/////////////////////////////////////////////////////////////////////////////////////
let actuallyDoingInitialLoadOfPossibleValue = doingInitialLoadOfPossibleValue;
- if(dynamicField.possibleValueProps && bulkLoadField.defaultValue && !doingInitialLoadOfPossibleValue && !everDidInitialLoadOfPossibleValue)
+ if (dynamicField.possibleValueProps && bulkLoadField.defaultValue && !doingInitialLoadOfPossibleValue && !everDidInitialLoadOfPossibleValue)
{
actuallyDoingInitialLoadOfPossibleValue = true;
setDoingInitialLoadOfPossibleValue(true);
@@ -104,7 +103,7 @@ export default function BulkLoadFileMappingField({bulkLoadField, isRequired, rem
{
try
{
- const possibleValues = await qController.possibleValues(bulkLoadField.tableStructure.tableName, null, fieldMetaData.name, null, [bulkLoadField.defaultValue], undefined, "filter");
+ const possibleValues = await qController.possibleValues(bulkLoadField.tableStructure.tableName, null, fieldMetaData.name, null, [bulkLoadField.defaultValue], undefined, null, "filter");
if (possibleValues && possibleValues.length > 0)
{
setPossibleValueInitialDisplayValue(possibleValues[0].label);
@@ -114,9 +113,9 @@ export default function BulkLoadFileMappingField({bulkLoadField, isRequired, rem
setPossibleValueInitialDisplayValue(null);
}
}
- catch(e)
+ catch (e)
{
- console.log(`Error loading possible value: ${e}`)
+ console.log(`Error loading possible value: ${e}`);
}
actuallyDoingInitialLoadOfPossibleValue = false;
@@ -124,7 +123,7 @@ export default function BulkLoadFileMappingField({bulkLoadField, isRequired, rem
})();
}
- if(dynamicField.possibleValueProps && possibleValueInitialDisplayValue)
+ if (dynamicField.possibleValueProps && possibleValueInitialDisplayValue)
{
dynamicField.possibleValueProps.initialDisplayValue = possibleValueInitialDisplayValue;
}
@@ -134,11 +133,11 @@ export default function BulkLoadFileMappingField({bulkLoadField, isRequired, rem
// don't allow duplicates //
//////////////////////////////////////////////////////
const columnOptions: { value: number, label: string }[] = [];
- const usedLabels: {[label: string]: boolean} = {};
+ const usedLabels: { [label: string]: boolean } = {};
for (let i = 0; i < columnNames.length; i++)
{
const label = columnNames[i];
- if(!usedLabels[label])
+ if (!usedLabels[label])
{
columnOptions.push({label: label, value: i});
usedLabels[label] = true;
@@ -148,9 +147,9 @@ export default function BulkLoadFileMappingField({bulkLoadField, isRequired, rem
//////////////////////////////////////////////////////////////////////
// try to pick up changes in the hasHeaderRow toggle from way above //
//////////////////////////////////////////////////////////////////////
- if(bulkLoadField.columnIndex != null && bulkLoadField.columnIndex != undefined && selectedColumn.label && columnNames[bulkLoadField.columnIndex] != selectedColumn.label)
+ if (bulkLoadField.columnIndex != null && bulkLoadField.columnIndex != undefined && selectedColumn.label && columnNames[bulkLoadField.columnIndex] != selectedColumn.label)
{
- setSelectedColumn({label: columnNames[bulkLoadField.columnIndex], value: bulkLoadField.columnIndex})
+ setSelectedColumn({label: columnNames[bulkLoadField.columnIndex], value: bulkLoadField.columnIndex});
setSelectedColumnInputValue(columnNames[bulkLoadField.columnIndex]);
}
diff --git a/src/qqq/components/query/FilterCriteriaPaster.tsx b/src/qqq/components/query/FilterCriteriaPaster.tsx
index 482332e..f451acb 100644
--- a/src/qqq/components/query/FilterCriteriaPaster.tsx
+++ b/src/qqq/components/query/FilterCriteriaPaster.tsx
@@ -19,6 +19,9 @@
* along with this program. If not, see .
*/
+import {QFieldMetaData} from "@kingsrook/qqq-frontend-core/lib/model/metaData/QFieldMetaData";
+import {QTableMetaData} from "@kingsrook/qqq-frontend-core/lib/model/metaData/QTableMetaData";
+import {QPossibleValue} from "@kingsrook/qqq-frontend-core/lib/model/QPossibleValue";
import {FormControl, InputLabel, Select, SelectChangeEvent} from "@mui/material";
import Box from "@mui/material/Box";
import Card from "@mui/material/Card";
@@ -28,20 +31,23 @@ import Modal from "@mui/material/Modal";
import TextField from "@mui/material/TextField";
import Tooltip from "@mui/material/Tooltip";
import Typography from "@mui/material/Typography";
-import {GridFilterItem} from "@mui/x-data-grid-pro";
-import React, {useEffect, useState} from "react";
import {QCancelButton, QSaveButton} from "qqq/components/buttons/DefaultButtons";
+
import ChipTextField from "qqq/components/forms/ChipTextField";
+import {LoadingState} from "qqq/models/LoadingState";
+import React, {useEffect, useReducer, useState} from "react";
interface Props
{
type: string;
onSave: (newValues: any[]) => void;
+ table?: QTableMetaData;
+ field?: QFieldMetaData;
}
FilterCriteriaPaster.defaultProps = {};
-function FilterCriteriaPaster({type, onSave}: Props): JSX.Element
+function FilterCriteriaPaster({table, field, type, onSave}: Props): JSX.Element
{
enum Delimiter
{
@@ -68,6 +74,12 @@ function FilterCriteriaPaster({type, onSave}: Props): JSX.Element
mainCardStyles.width = "60%";
mainCardStyles.minWidth = "500px";
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ // add a LoadingState object, in case the initial loads (of meta data and view) are slow //
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ const [, forceUpdate] = useReducer((x) => x + 1, 0);
+ const [pageLoadingState, _] = useState(new LoadingState(forceUpdate));
+
//x const [gridFilterItem, setGridFilterItem] = useState(props.item);
const [pasteModalIsOpen, setPasteModalIsOpen] = useState(false);
const [inputText, setInputText] = useState("");
@@ -75,8 +87,11 @@ function FilterCriteriaPaster({type, onSave}: Props): JSX.Element
const [delimiterCharacter, setDelimiterCharacter] = useState("");
const [customDelimiterValue, setCustomDelimiterValue] = useState("");
const [chipData, setChipData] = useState(undefined);
+ const [chipValidity, setChipValidity] = useState([] as boolean[]);
+ const [chipPVSIds, setChipPVSIds] = useState([] as any[]);
const [detectedText, setDetectedText] = useState("");
const [errorText, setErrorText] = useState("");
+ const [saveDisabled, setSaveDisabled] = useState(true);
//////////////////////////////////////////////////////////////
// handler for when paste icon is clicked in 'any' operator //
@@ -92,6 +107,7 @@ function FilterCriteriaPaster({type, onSave}: Props): JSX.Element
setDelimiter("");
setDelimiterCharacter("");
setChipData([]);
+ setChipValidity([]);
setInputText("");
setDetectedText("");
setCustomDelimiterValue("");
@@ -106,18 +122,43 @@ function FilterCriteriaPaster({type, onSave}: Props): JSX.Element
const handleSaveClicked = () =>
{
- ////////////////////////////////////////
- // if numeric remove any non-numerics //
- ////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////
+ // if numeric remove any non-numerics, or invalid pvs values //
+ ///////////////////////////////////////////////////////////////
let saveData = [];
+ let usedLabels = new Map();
for (let i = 0; i < chipData.length; i++)
{
- if (type !== "number" || !Number.isNaN(Number(chipData[i])))
+ if (chipValidity[i] === true)
{
- saveData.push(chipData[i]);
+ if (type === "pvs")
+ {
+ /////////////////////////////////////////////
+ // if already used this PVS label, skip it //
+ /////////////////////////////////////////////
+ if (usedLabels.get(chipData[i]) != null)
+ {
+ continue;
+ }
+
+ saveData.push(new QPossibleValue({id: chipPVSIds[i], label: chipData[i]}));
+ usedLabels.set(chipData[i], true);
+ }
+ else
+ {
+ saveData.push(chipData[i]);
+ }
}
}
+ //////////////////////////////////////////
+ // for pvs, sort by label before saving //
+ //////////////////////////////////////////
+ if (type === "pvs")
+ {
+ saveData.sort((a: QPossibleValue, b: QPossibleValue) => b.label.localeCompare(a.label));
+ }
+
onSave(saveData);
clearData();
@@ -259,12 +300,19 @@ function FilterCriteriaPaster({type, onSave}: Props): JSX.Element
{
chipData.push(part);
- ///////////////////////////////////////////////////////////
- // if numeric, check that first before pushing as a chip //
- ///////////////////////////////////////////////////////////
- if (type === "number" && Number.isNaN(Number(part)))
+ //////////////////////////////////////////////////////////////////////
+ // if numeric or pvs, check validity first before pushing as a chip //
+ //////////////////////////////////////////////////////////////////////
+ if (chipValidity[i] !== true)
{
- setErrorText("Some values are not numbers");
+ if (type === "number" && Number.isNaN(Number(part)))
+ {
+ setErrorText("Some values are not numbers");
+ }
+ else if (type === "pvs")
+ {
+ setErrorText("Some values are not valid");
+ }
}
}
}
@@ -272,7 +320,7 @@ function FilterCriteriaPaster({type, onSave}: Props): JSX.Element
setChipData(chipData);
- }, [inputText, delimiterCharacter, customDelimiterValue, detectedText]);
+ }, [inputText, delimiterCharacter, customDelimiterValue, detectedText, chipValidity]);
return (
@@ -283,128 +331,153 @@ function FilterCriteriaPaster({type, onSave}: Props): JSX.Element
pasteModalIsOpen &&
(
-
-
-
-
-
-
- Bulk Add Filter Values
-
- Paste into the box on the left.
- Review the filter values in the box on the right.
- If the filter values are not what are expected, try changing the separator using the dropdown below.
-
+
+
+
+
+
+
+
+ Bulk Add Filter Values
+
+ Paste into the box on the left.
+ Review the filter values in the box on the right.
+ If the filter values are not what are expected, try changing the separator using the dropdown below.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {
+ setErrorText("");
+ if (isMakingRequest)
+ {
+ pageLoadingState.setLoading();
+ }
+ else
+ {
+ pageLoadingState.setNotLoading();
+ }
+ setSaveDisabled(isMakingRequest);
+ setChipPVSIds(chipPVSIds);
+ setChipValidity(chipValidity);
+ }}
+ table={table}
+ field={field}
+ chipData={chipData}
+ chipValidity={chipValidity}
+ chipType={type}
+ multiline
+ fullWidth
+ variant="outlined"
+ id="tags"
+ rows={0}
+ name="tags"
+ label="FILTER VALUES REVIEW"
+ />
+
-
-
-
-
-
-
-
-
-
-
- {
- }}
- chipData={chipData}
- chipType={type}
- multiline
- fullWidth
- variant="outlined"
- id="tags"
- rows={0}
- name="tags"
- label="FILTER VALUES REVIEW"
- />
-
-
-
-
-
-
-
-
- SEPARATOR
-
-
-
- {delimiter === Delimiter.CUSTOM.valueOf() && (
-
-
-
+
+
+
+
+
+ SEPARATOR
+
+
- )}
- {inputText && delimiter === Delimiter.DETECT_AUTOMATICALLY.valueOf() && (
+ {delimiter === Delimiter.CUSTOM.valueOf() && (
-
- {detectedText}
-
- )}
-
+
+
+
+ )}
+ {inputText && delimiter === Delimiter.DETECT_AUTOMATICALLY.valueOf() && (
+
+
+ {detectedText}
+
+ )}
+
+
+
+ {
+ errorText && chipData.length > 0 && (
+
+ error
+ {errorText}
+
+ )
+ }
+ {
+ pageLoadingState.isLoadingSlow() && (
+
+ warning
+ Loading...
+
+ )
+ }
+
+
+ {
+ chipData && chipData.length > 0 && (
+ {chipData.length.toLocaleString()} {chipData.length === 1 ? "value" : "values"}
+ )
+ }
+
-
- {
- errorText && chipData.length > 0 && (
-
- error
- {errorText}
-
- )
- }
-
-
- {
- chipData && chipData.length > 0 && (
- {chipData.length.toLocaleString()} {chipData.length === 1 ? "value" : "values"}
- )
- }
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/src/qqq/components/query/FilterCriteriaRowValues.tsx b/src/qqq/components/query/FilterCriteriaRowValues.tsx
index 0e4fa18..9c73636 100644
--- a/src/qqq/components/query/FilterCriteriaRowValues.tsx
+++ b/src/qqq/components/query/FilterCriteriaRowValues.tsx
@@ -398,20 +398,25 @@ function FilterCriteriaRowValues({operatorOption, criteria, field, table, valueC
initialValues = criteria.values;
}
}
- return
- valueChangeHandler(null, "all", value)}
- variant="standard"
- useCase="filter"
- />
+ return
+
+ valueChangeHandler(null, "all", value)}
+ variant="standard"
+ useCase="filter"
+ />
+
+
+ saveNewPasterValues(newValues)} />
+
;
}
diff --git a/src/qqq/components/query/QuickFilter.tsx b/src/qqq/components/query/QuickFilter.tsx
index 029d450..ea72200 100644
--- a/src/qqq/components/query/QuickFilter.tsx
+++ b/src/qqq/components/query/QuickFilter.tsx
@@ -38,7 +38,7 @@ import XIcon from "qqq/components/query/XIcon";
import {QueryScreenUsage} from "qqq/pages/records/query/RecordQuery";
import FilterUtils from "qqq/utils/qqq/FilterUtils";
import TableUtils from "qqq/utils/qqq/TableUtils";
-import React, {SyntheticEvent, useContext, useReducer, useState} from "react";
+import React, {SyntheticEvent, useContext, useEffect, useReducer, useState} from "react";
export type CriteriaParamType = QFilterCriteriaWithId | null | "tooComplex";
@@ -135,7 +135,7 @@ const getOperatorSelectedValue = (operatorOptions: OperatorOption[], criteria: Q
return (filteredOptions[0]);
}
- if(return0thOptionInsteadOfNull)
+ if (return0thOptionInsteadOfNull)
{
console.log("Returning 0th operator instead of null - this isn't expected, but has been seen to happen - so here's some additional debugging:");
try
@@ -144,7 +144,7 @@ const getOperatorSelectedValue = (operatorOptions: OperatorOption[], criteria: Q
console.log("Criteria: " + JSON.stringify(criteria));
console.log("Default Operator: " + JSON.stringify(defaultOperator));
}
- catch(e)
+ catch (e)
{
console.log(`Error in debug output: ${e}`);
}
@@ -186,6 +186,13 @@ export default function QuickFilter({tableMetaData, fullFieldName, fieldMetaData
//////////////////////
const [, forceUpdate] = useReducer((x) => x + 1, 0);
+ useEffect(() =>
+ {
+ //////////////////////////////////////////////////////////////////////////////
+ // was not seeing criteria changes take place until watching it stringified //
+ //////////////////////////////////////////////////////////////////////////////
+ setCriteria(criteria);
+ }, [JSON.stringify(criteria)]);
/*******************************************************************************
**
diff --git a/src/qqq/utils/qqq/FilterUtils.tsx b/src/qqq/utils/qqq/FilterUtils.tsx
index b5bb4f7..6c9f09b 100644
--- a/src/qqq/utils/qqq/FilterUtils.tsx
+++ b/src/qqq/utils/qqq/FilterUtils.tsx
@@ -133,7 +133,7 @@ class FilterUtils
}
else
{
- values = await qController.possibleValues(fieldTable.name, null, field.name, "", values, undefined, "filter");
+ values = await qController.possibleValues(fieldTable.name, null, field.name, "", values, undefined, undefined, "filter");
}
}