Skip to content

Commit

Permalink
[fix] GH-7 viewKind in DispatchCell, peer deps
Browse files Browse the repository at this point in the history
  • Loading branch information
amivanoff committed Aug 25, 2021
1 parent ba82d36 commit 08dbddf
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 12 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@
"rc-util": ">=5.13.2",
"react-split-pane": ">=2.0.3",
"tinymce": ">=5.5.1",
"uri-js": ">=4.4.1"
"uri-js": ">=4.4.1",
"uuid62": ">=1.0.1"
},
"dependencies": {
"@agentlab/sparql-jsld-client": "^5.0.0-rc.10",
Expand Down
18 changes: 9 additions & 9 deletions src/DispatchCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ import { MstContext } from './MstContext';
*/
export const DispatchCell: React.FC<DispatchCellProps> = React.memo(
({
data,
onMeasureChange,
uri,
schema,
viewKind,
viewKindElement,
viewDescr,
viewDescrElement,
schema,
data,
onMeasureChange,
uri,
enabled,
id,
CKey,
Expand All @@ -51,15 +51,15 @@ export const DispatchCell: React.FC<DispatchCellProps> = React.memo(
return (
<ErrorBoundary FallbackComponent={ErrorFallback} onReset={() => {}}>
<Render
CKey={CKey}
data={data}
rowData={rowData}
onMeasureChange={onMeasureChange}
schema={schema}
viewKind={viewKind}
viewKindElement={viewKindElement}
viewDescr={viewDescr}
viewDescrElement={viewDescrElement}
schema={schema}
CKey={CKey}
data={data}
rowData={rowData}
onMeasureChange={onMeasureChange}
uri={uri}
enabled={enabled}
id={id}
Expand Down
23 changes: 21 additions & 2 deletions src/util/ContextToProps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ export const withStoreToDataControlProps = (Component: any): any =>
uri={id}
dataSource={data}
editing={store.editingData.get(collIriOverride)}
viewKind={viewKind}
viewKindElement={viewKindElement}
viewDescr={viewDescr}
viewDescrElement={viewDescrElement}
Expand Down Expand Up @@ -338,6 +339,7 @@ export const withStoreToSelectControlProps = (Component: any): any =>
return (
<Component
dataSource={data}
viewKind={viewKind}
viewKindElement={viewKindElement}
viewDescr={viewDescr}
viewDescrElement={viewDescrElement}
Expand All @@ -350,7 +352,7 @@ export const withStoreToSelectControlProps = (Component: any): any =>

export const withStoreToTabProps = (Component: any): any =>
observer<any>(({ ...props }: any) => {
const { schema, viewKind } = props;
const { schema, viewKind, viewDescr } = props;
const { store } = useContext(MstContext);
//if (viewKindElement.resultsScope && !store.saveLogicTree[viewKindElement.resultsScope]) {
// store.setSaveLogic(viewKindElement.resultsScope);
Expand Down Expand Up @@ -380,7 +382,19 @@ export const withStoreToTabProps = (Component: any): any =>
// });
}
};
return <Component schema={schema} uri={id} tabs={data} handleChange={onChange} options={options} />;
return (
<Component
viewKind={viewKind}
viewKindElement={viewKindElement}
viewDescr={viewDescr}
viewDescrElement={viewDescrElement}
schema={schema}
uri={id}
tabs={data}
handleChange={onChange}
options={options}
/>
);
});

export const withStoreToMenuProps = (Component: any): any =>
Expand Down Expand Up @@ -410,6 +424,7 @@ export const withStoreToMenuProps = (Component: any): any =>
}
schema={schema}
viewKind={viewKind}
viewKindElement={viewKindElement}
viewDescr={viewDescr}
viewDescrElement={viewDescrElement}
uri={id}
Expand Down Expand Up @@ -477,6 +492,10 @@ export const withStoreToArrayProps = (Component: any): any =>
};
return (
<Component
viewKind={viewKind}
viewKindElement={viewKindElement}
viewDescr={viewDescr}
viewDescrElement={viewDescrElement}
schema={schema}
limit={10 /*store.queries[viewKindElement.resultsScope].limit*/}
loadExpandedData={loadExpandedData}
Expand Down

0 comments on commit 08dbddf

Please sign in to comment.