Merge branch 'dev' into integration

This commit is contained in:
Tim Chamberlain
2025-07-08 11:06:41 -05:00
2 changed files with 14 additions and 2 deletions

View File

@ -123,7 +123,15 @@ function ChipTextField({...props})
setChips(chipData);
chipsRef.current = chipData;
determineChipColors();
}, [JSON.stringify(chipData)]);
if (chipType !== "pvs")
{
const currentChipValidity = chips.map((chip, i) =>
(chipType !== "number" || !Number.isNaN(Number(chips[i])))
);
setChipValidity(currentChipValidity);
}
}, [JSON.stringify(chipData), chips]);
useEffect(() =>
{

View File

@ -298,6 +298,10 @@ function FilterCriteriaPaster({table, field, type, onSave}: Props): JSX.Element
let regex = new RegExp(currentDelimiterCharacter);
let parts = inputText.split(regex);
let chipData = [] as string[];
/////////////////////////////////////////////////////////////////
// use a map to keep track of the counts for each unique value //
/////////////////////////////////////////////////////////////////
const uniqueValuesMap: { [key: string]: number } = {};
///////////////////////////////////////////////////////
@ -338,7 +342,7 @@ function FilterCriteriaPaster({table, field, type, onSave}: Props): JSX.Element
if (type === "number")
{
let suffix = invalidCount === 1 ? " value is not a number" : " values are not numbers";
setErrorText(invalidCount + suffix + "numbers and will not be added to the filter");
setErrorText(invalidCount + suffix + " and will not be added to the filter");
}
else if (type === "pvs")
{