Skip to content

Commit 33b0326

Browse files
committed
chore: apply review changes
1 parent 6b6f194 commit 33b0326

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

packages/pluggableWidgets/datagrid-dropdown-filter-web/src/hocs/withAttrGuard.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import { Alert } from "@mendix/widget-plugin-component-kit/Alert";
22
import { FC, createElement } from "react";
33

4+
/**
5+
* @remark Any changes made in this hoc should be reflected in
6+
* 'withAttributeGuard' hoc as well.
7+
*/
48
export function withAttrGuard<P extends { attr: { filterable: boolean } } | { refEntity: { filterable: boolean } }>(
59
Component: FC<P>
610
): FC<P> {
@@ -10,8 +14,9 @@ export function withAttrGuard<P extends { attr: { filterable: boolean } } | { re
1014
if (!meta.filterable) {
1115
return (
1216
<Alert bootstrapStyle="danger">
13-
Only filterable attributes are allowed. The attributes in the current widget configuration is not
14-
filterable. Please change the widget configuration.
17+
The attribute in the current widget configuration is{" "}
18+
<a href="https://docs.mendix.com/refguide/attributes/#limitations">not filterable</a>. Please change
19+
the widget configuration.
1520
</Alert>
1621
);
1722
}

packages/shared/widget-plugin-filtering/src/helpers/withAttributeGuard.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ interface RequiredProps {
77
}>;
88
}
99

10+
/**
11+
* @remark Any changes made in this hoc should be reflected in
12+
* 'withAttrGuard' hoc as well.
13+
*/
1014
export function withAttributeGuard<P extends RequiredProps>(Component: FC<P>): FC<P> {
1115
return function AttributesGuard(props) {
1216
const isValid = useMemo(
@@ -17,8 +21,9 @@ export function withAttributeGuard<P extends RequiredProps>(Component: FC<P>): F
1721
if (!isValid) {
1822
return (
1923
<Alert bootstrapStyle="danger">
20-
Only filterable attributes are allowed. One of the attributes in the current widget configuration is
21-
not filterable. Please change the widget configuration.
24+
The attributes in the current widget configuration is{" "}
25+
<a href="https://docs.mendix.com/refguide/attributes/#limitations">not filterable</a>. Please change
26+
the widget configuration.
2227
</Alert>
2328
);
2429
}

0 commit comments

Comments
 (0)