mirror of
https://github.com/Kingsrook/qqq-frontend-material-dashboard.git
synced 2025-07-18 21:30:45 +00:00
Merge branch 'dev' into integration
This commit is contained in:
@ -123,7 +123,15 @@ function ChipTextField({...props})
|
|||||||
setChips(chipData);
|
setChips(chipData);
|
||||||
chipsRef.current = chipData;
|
chipsRef.current = chipData;
|
||||||
determineChipColors();
|
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(() =>
|
useEffect(() =>
|
||||||
{
|
{
|
||||||
|
@ -298,6 +298,10 @@ function FilterCriteriaPaster({table, field, type, onSave}: Props): JSX.Element
|
|||||||
let regex = new RegExp(currentDelimiterCharacter);
|
let regex = new RegExp(currentDelimiterCharacter);
|
||||||
let parts = inputText.split(regex);
|
let parts = inputText.split(regex);
|
||||||
let chipData = [] as string[];
|
let chipData = [] as string[];
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////
|
||||||
|
// use a map to keep track of the counts for each unique value //
|
||||||
|
/////////////////////////////////////////////////////////////////
|
||||||
const uniqueValuesMap: { [key: string]: number } = {};
|
const uniqueValuesMap: { [key: string]: number } = {};
|
||||||
|
|
||||||
///////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////
|
||||||
@ -338,7 +342,7 @@ function FilterCriteriaPaster({table, field, type, onSave}: Props): JSX.Element
|
|||||||
if (type === "number")
|
if (type === "number")
|
||||||
{
|
{
|
||||||
let suffix = invalidCount === 1 ? " value is not a number" : " values are not numbers";
|
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")
|
else if (type === "pvs")
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user