switch grid view command moved

This commit is contained in:
Jan Prochazka
2021-04-08 09:00:02 +02:00
parent 48f8908040
commit d3a019e8a3
4 changed files with 68 additions and 91 deletions

View File

@@ -1,15 +1,6 @@
<script lang="ts" context="module">
const getCurrentDataForm = () => getActiveComponent('FormView');
registerCommand({
id: 'dataForm.switchToTable',
category: 'Data form',
name: 'Switch to table',
keyText: 'F4',
testEnabled: () => getCurrentDataForm() != null,
onClick: () => getCurrentDataForm().switchToTable(),
});
// registerCommand({
// id: 'dataForm.save',
// group: 'save',
@@ -219,14 +210,6 @@
if (onNavigate) onNavigate(command);
}
export function switchToTable() {
setConfig(cfg => ({
...cfg,
isFormView: false,
formViewKey: null,
}));
}
// export function save() {
// if ($inplaceEditorState.cell) {
// // @ts-ignore
@@ -341,7 +324,7 @@
return {};
}, {});
registerMenu(
{ command: 'dataForm.switchToTable' },
{ placeTag: 'switch' },
{ command: 'dataForm.copyToClipboard' },
{ divider: true },
{ command: 'dataForm.filterSelected' },