form view - loading, navigation

This commit is contained in:
Jan Prochazka
2021-01-09 21:27:34 +01:00
parent b71b58c93f
commit 5ab2ed9646
5 changed files with 167 additions and 14 deletions

View File

@@ -62,7 +62,7 @@ const NullSpan = styled.span`
`;
export default function FormView(props) {
const { rowData, toolbarPortalRef, tabVisible, config, setConfig } = props;
const { rowData, toolbarPortalRef, tabVisible, config, setConfig, onNavigate } = props;
/** @type {import('dbgate-datalib').FormViewDisplay} */
const formDisplay = props.formDisplay;
const theme = useTheme();
@@ -81,7 +81,10 @@ export default function FormView(props) {
toolbarPortalRef &&
toolbarPortalRef.current &&
tabVisible &&
ReactDOM.createPortal(<FormViewToolbar switchToTable={handleSwitchToTable} />, toolbarPortalRef.current);
ReactDOM.createPortal(
<FormViewToolbar switchToTable={handleSwitchToTable} onNavigate={onNavigate} />,
toolbarPortalRef.current
);
// console.log('display', display);