Skip to content

Commit

Permalink
fix: always run field resolvers when item change
Browse files Browse the repository at this point in the history
If two items share an item selector, the resolver will not re-run
  • Loading branch information
chrisvxd committed Nov 15, 2024
1 parent 196227b commit 159d819
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/components/Puck/components/Fields/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ const useResolvedFields = (): [FieldsType, boolean] => {
} else {
setResolvedFields(defaultFields);
}
}, [data, defaultFields, state.ui.itemSelector, hasResolver]);
}, [data, defaultFields, selectedItem, hasResolver]);

return [resolvedFields, fieldsLoading];
};
Expand Down

0 comments on commit 159d819

Please sign in to comment.