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 11import { Alert } from "@mendix/widget-plugin-component-kit/Alert" ;
22import { FC , createElement } from "react" ;
33
4+ /**
5+ * @remark Any changes made in this hoc should be reflected in
6+ * 'withAttributeGuard' hoc as well.
7+ */
48export 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 }
Original file line number Diff line number Diff 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+ */
1014export 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 }
You can’t perform that action at this time.
0 commit comments