@antscorp/antsomi-ui 1.3.5-beta.85 → 1.3.5-beta.87
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.
|
@@ -118,7 +118,9 @@ export const useTemplateListing = (options) => {
|
|
|
118
118
|
// Memo
|
|
119
119
|
const templateDetail = useDeepCompareMemo(() => {
|
|
120
120
|
if (infiniteObjectTemplate && selectedTemplateId) {
|
|
121
|
-
return infiniteObjectTemplate.pages
|
|
121
|
+
return infiniteObjectTemplate.pages
|
|
122
|
+
.flatMap(({ entities }) => entities.flat())
|
|
123
|
+
.find(objectTemplate => +objectTemplate.id === +selectedTemplateId);
|
|
122
124
|
}
|
|
123
125
|
return undefined;
|
|
124
126
|
}, [infiniteObjectTemplate, selectedTemplateId]);
|