File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed
pluggableWidgets/datagrid-dropdown-filter-web/src/hocs
shared/widget-plugin-filtering/src/helpers Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 1
1
import { Alert } from "@mendix/widget-plugin-component-kit/Alert" ;
2
2
import { FC , createElement } from "react" ;
3
3
4
+ /**
5
+ * @remark Any changes made in this hoc should be reflected in
6
+ * 'withAttributeGuard' hoc as well.
7
+ */
4
8
export function withAttrGuard < P extends { attr : { filterable : boolean } } | { refEntity : { filterable : boolean } } > (
5
9
Component : FC < P >
6
10
) : FC < P > {
@@ -10,8 +14,9 @@ export function withAttrGuard<P extends { attr: { filterable: boolean } } | { re
10
14
if ( ! meta . filterable ) {
11
15
return (
12
16
< 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.
15
20
</ Alert >
16
21
) ;
17
22
}
Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ interface RequiredProps {
7
7
} > ;
8
8
}
9
9
10
+ /**
11
+ * @remark Any changes made in this hoc should be reflected in
12
+ * 'withAttrGuard' hoc as well.
13
+ */
10
14
export function withAttributeGuard < P extends RequiredProps > ( Component : FC < P > ) : FC < P > {
11
15
return function AttributesGuard ( props ) {
12
16
const isValid = useMemo (
@@ -17,8 +21,9 @@ export function withAttributeGuard<P extends RequiredProps>(Component: FC<P>): F
17
21
if ( ! isValid ) {
18
22
return (
19
23
< 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.
22
27
</ Alert >
23
28
) ;
24
29
}
You can’t perform that action at this time.
0 commit comments