Skip to content

Commit

Permalink
fix: correct merging in store
Browse files Browse the repository at this point in the history
  • Loading branch information
Domino987 committed Jul 9, 2022
1 parent b086c4e commit 13f1b7c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/store/LocalizationStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const createStore = () =>
localization: defaultLocalization,
mergeLocalization: (nextLocalization) => {
set(({ localization }) => {
const mergedLocalization = deepmerge(nextLocalization, localization);
const mergedLocalization = deepmerge(localization, nextLocalization);
mergedLocalization.body.editRow.dateTimePickerLocalization =
mergedLocalization.dateTimePickerLocalization;
mergedLocalization.body.filterRow.dateTimePickerLocalization =
Expand Down Expand Up @@ -104,12 +104,11 @@ function useMergeProps(props) {
}
}, [props.icons]);
React.useEffect(() => {
console.log('effect', props.components);
if (props.components) {
mergeComponents(props.components);
}
}, [props.components]);
console.log(components);
console.log(localization, props.localization);
return {
localization,
options,
Expand Down

0 comments on commit 13f1b7c

Please sign in to comment.