File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
packages/pluggableWidgets/datagrid-web/src/components Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change
1
+ import { If } from "@mendix/widget-plugin-component-kit/If" ;
1
2
import { observer } from "mobx-react-lite" ;
2
3
import { createElement , ReactElement , ReactNode } from "react" ;
3
4
import { PaginationEnum , PagingPositionEnum } from "../../typings/DatagridProps" ;
@@ -41,8 +42,10 @@ export function WidgetFooter(props: WidgetFooterProps): ReactElement | null {
41
42
42
43
const SelectionCounter = observer ( function SelectionCounter ( ) {
43
44
const { selectionCountStore } = useDatagridRootScope ( ) ;
44
- if ( selectionCountStore . displayCount ) {
45
- return < span className = "widget-datagrid-selection-count" > { selectionCountStore . displayCount } </ span > ;
46
- }
47
- return null ;
45
+
46
+ return (
47
+ < If condition = { selectionCountStore . displayCount !== "" } >
48
+ < span className = "widget-datagrid-selection-count" > { selectionCountStore . displayCount } </ span >
49
+ </ If >
50
+ ) ;
48
51
} ) ;
You can’t perform that action at this time.
0 commit comments