@contentful/field-editor-rich-text 2.3.18 → 2.3.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/field-editor-rich-text.cjs.development.js +4 -2
- package/dist/field-editor-rich-text.cjs.development.js.map +1 -1
- package/dist/field-editor-rich-text.cjs.production.min.js +1 -1
- package/dist/field-editor-rich-text.cjs.production.min.js.map +1 -1
- package/dist/field-editor-rich-text.esm.js +4 -2
- package/dist/field-editor-rich-text.esm.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.3.19](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@2.3.18...@contentful/field-editor-rich-text@2.3.19) (2022-08-10)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- update hooks deps in useFetchedEntity [TOL-339] ([#1212](https://github.com/contentful/field-editors/issues/1212)) ([02ae9be](https://github.com/contentful/field-editors/commit/02ae9be167bea5876d52db27a4363a69bdfc6209))
|
|
11
|
+
|
|
6
12
|
## [2.3.18](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@2.3.17...@contentful/field-editor-rich-text@2.3.18) (2022-08-10)
|
|
7
13
|
|
|
8
14
|
### Bug Fixes
|
|
@@ -2160,7 +2160,9 @@ function useFetchedEntity(_ref) {
|
|
|
2160
2160
|
getEntry = _useEntities.getEntry,
|
|
2161
2161
|
getAsset = _useEntities.getAsset;
|
|
2162
2162
|
|
|
2163
|
-
var store =
|
|
2163
|
+
var store = React.useMemo(function () {
|
|
2164
|
+
return type === 'Entry' ? entries : assets;
|
|
2165
|
+
}, [assets, entries, type]);
|
|
2164
2166
|
|
|
2165
2167
|
var _useState = React.useState(store == null ? void 0 : store[id]),
|
|
2166
2168
|
entity = _useState[0],
|
|
@@ -2189,7 +2191,7 @@ function useFetchedEntity(_ref) {
|
|
|
2189
2191
|
// TODO: consider rewriting useEntities() hook to avoid that happening in
|
|
2190
2192
|
// first place.
|
|
2191
2193
|
// eslint-disable-next-line react-hooks/exhaustive-deps -- TODO: explain this disable
|
|
2192
|
-
}, [type, id]);
|
|
2194
|
+
}, [type, id, store]);
|
|
2193
2195
|
React.useEffect(function () {
|
|
2194
2196
|
if (entity) {
|
|
2195
2197
|
onEntityFetchComplete == null ? void 0 : onEntityFetchComplete();
|