diff --git a/src/qqq/components/forms/EntityForm.tsx b/src/qqq/components/forms/EntityForm.tsx index 2199ff9..bd01e2a 100644 --- a/src/qqq/components/forms/EntityForm.tsx +++ b/src/qqq/components/forms/EntityForm.tsx @@ -927,7 +927,7 @@ function EntityForm(props: Props): JSX.Element else { setAlertContent(error.message); - HtmlUtils.autoScroll(0); + scrollToTopToShowAlert(); } }); } @@ -973,7 +973,7 @@ function EntityForm(props: Props): JSX.Element else { setAlertContent(error.message); - HtmlUtils.autoScroll(0); + scrollToTopToShowAlert(); } }); } @@ -981,6 +981,22 @@ function EntityForm(props: Props): JSX.Element }; + /******************************************************************************* + ** + *******************************************************************************/ + function scrollToTopToShowAlert() + { + if (props.isModal) + { + document.getElementById("modalTopReference")?.scrollIntoView(); + } + else + { + HtmlUtils.autoScroll(0); + } + } + + /******************************************************************************* ** *******************************************************************************/ @@ -1265,6 +1281,7 @@ function EntityForm(props: Props): JSX.Element return ( + {body} diff --git a/src/qqq/components/horseshoe/Breadcrumbs.tsx b/src/qqq/components/horseshoe/Breadcrumbs.tsx index cc396bd..5322dcb 100644 --- a/src/qqq/components/horseshoe/Breadcrumbs.tsx +++ b/src/qqq/components/horseshoe/Breadcrumbs.tsx @@ -94,16 +94,19 @@ function QBreadcrumbs({icon, title, route, light}: Props): JSX.Element { //////////////////////////////////////////////////////// // avoid showing "saved view" as a breadcrumb element // + // e.g., if at /app/table/savedView/1 (so where i==2) // //////////////////////////////////////////////////////// - if(routes[i] === "savedView") + if(routes[i] === "savedView" && i == 2) { continue; } /////////////////////////////////////////////////////////////////////// // avoid showing the table name if it's the element before savedView // + // e.g., when at /app/table/savedView/1 (so where i==1) // + // we want to just be showing "App" // /////////////////////////////////////////////////////////////////////// - if(i < routes.length - 1 && routes[i+1] == "savedView") + if(i < routes.length - 1 && routes[i+1] == "savedView" && i == 1) { continue; } diff --git a/src/qqq/components/query/QuickFilter.tsx b/src/qqq/components/query/QuickFilter.tsx index 9de8049..60e0cbf 100644 --- a/src/qqq/components/query/QuickFilter.tsx +++ b/src/qqq/components/query/QuickFilter.tsx @@ -507,7 +507,7 @@ export default function QuickFilter({tableMetaData, fullFieldName, fieldMetaData ////////////////////////////// // return the button & menu // ////////////////////////////// - const widthAndMaxWidth = (fieldMetaData?.type == QFieldType.DATE_TIME) ? 295 : 250; + const widthAndMaxWidth = (fieldMetaData?.type == QFieldType.DATE_TIME) ? 315 : 250; return ( <> {button} diff --git a/src/qqq/components/sharing/ShareModal.tsx b/src/qqq/components/sharing/ShareModal.tsx index 3bfa7f4..634b579 100644 --- a/src/qqq/components/sharing/ShareModal.tsx +++ b/src/qqq/components/sharing/ShareModal.tsx @@ -369,15 +369,15 @@ export default function ShareModal({open, onClose, tableMetaData, record}: Share {/* header */} - + Share {tableMetaData.label}: {record?.recordLabel ?? record?.values?.get(tableMetaData.primaryKeyField) ?? "Unknown"} - + {/* todo move to helpContent (what do we attach the meta-data too??) */} Select a user or a group to share this record with. {/*You can choose if they should only be able to Read the record, or also make Edits to it.*/} - + {alert && setAlert(null)}>{alert}} {statusString} {!alert && !statusString && (<> )} diff --git a/src/qqq/utils/qqq/FilterUtils.tsx b/src/qqq/utils/qqq/FilterUtils.tsx index 2a5e20b..d34cbb9 100644 --- a/src/qqq/utils/qqq/FilterUtils.tsx +++ b/src/qqq/utils/qqq/FilterUtils.tsx @@ -110,6 +110,7 @@ class FilterUtils let values = criteria.values; let hasFilterVariable = false; + if (field.possibleValueSourceName) { ////////////////////////////////////////////////////////////////////////////////// @@ -123,6 +124,9 @@ class FilterUtils ////////////////////////////////////////////////////////////////////////////////// if (values && values.length > 0 && values[0] !== null && values[0] !== undefined && values[0] !== "") { + //////////////////////////////////////////////////////////////////////// + // do not do this lookup if the field is a filter variable expression // + //////////////////////////////////////////////////////////////////////// if (values[0].type && values[0].type == "FilterVariableExpression") { hasFilterVariable = true; @@ -142,11 +146,7 @@ class FilterUtils } } - if (hasFilterVariable) - { - values[0] = new FilterVariableExpression({fieldName: field.name, valueIndex: 0}); - } - else if (values && values.length) + if (values && values.length) { for (let i = 0; i < values.length; i++) { @@ -245,6 +245,10 @@ class FilterUtils { return (new ThisOrLastPeriodExpression(value)); } + else if (value.type == "FilterVariableExpression") + { + return (new FilterVariableExpression(value)); + } } return (null);