frontend-plugin-api: return output from extension factories instead
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -107,14 +107,14 @@ export function createSearchResultListItemExtension<
|
||||
output: {
|
||||
item: searchResultItemExtensionData,
|
||||
},
|
||||
factory({ bind, config, source }) {
|
||||
factory({ config, source }) {
|
||||
const ExtensionComponent = lazy(() =>
|
||||
options
|
||||
.component({ config })
|
||||
.then(component => ({ default: component })),
|
||||
) as unknown as SearchResultItemExtensionComponent;
|
||||
|
||||
bind({
|
||||
return {
|
||||
item: {
|
||||
predicate: options.predicate,
|
||||
component: props => (
|
||||
@@ -129,7 +129,7 @@ export function createSearchResultListItemExtension<
|
||||
</ExtensionBoundary>
|
||||
),
|
||||
},
|
||||
});
|
||||
};
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user