File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
packages/shared/widget-plugin-sorting/src/react/hocs Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 1
1
import { useSetup } from "@mendix/widget-plugin-mobx-kit/react/useSetup" ;
2
2
import { AttributeMetaData , DynamicValue } from "mendix" ;
3
- import { createElement , FC } from "react" ;
3
+ import { createElement , FC , useEffect } from "react" ;
4
4
import { SortStoreProvider } from "../../helpers/SortStoreProvider" ;
5
5
import { BasicSortStore } from "../../types/store" ;
6
6
import { SortAPI } from "../context" ;
@@ -24,7 +24,9 @@ export function withLinkedSortStore<P extends RequiredProps>(
24
24
} )
25
25
) ;
26
26
27
- store . setProps ( props ) ;
27
+ useEffect ( ( ) => {
28
+ store . setProps ( { attributes : props . attributes } ) ;
29
+ } , [ store , props . attributes ] ) ;
28
30
29
31
return < Component { ...props } sortStore = { store } /> ;
30
32
} ;
You can’t perform that action at this time.
0 commit comments