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 11import { useSetup } from "@mendix/widget-plugin-mobx-kit/react/useSetup" ;
22import { AttributeMetaData , DynamicValue } from "mendix" ;
3- import { createElement , FC } from "react" ;
3+ import { createElement , FC , useEffect } from "react" ;
44import { SortStoreProvider } from "../../helpers/SortStoreProvider" ;
55import { BasicSortStore } from "../../types/store" ;
66import { SortAPI } from "../context" ;
@@ -24,7 +24,9 @@ export function withLinkedSortStore<P extends RequiredProps>(
2424 } )
2525 ) ;
2626
27- store . setProps ( props ) ;
27+ useEffect ( ( ) => {
28+ store . setProps ( { attributes : props . attributes } ) ;
29+ } , [ store , props . attributes ] ) ;
2830
2931 return < Component { ...props } sortStore = { store } /> ;
3032 } ;
You can’t perform that action at this time.
0 commit comments