some bugfixes

This commit is contained in:
Martin McKeaveney 2021-06-17 12:48:37 +01:00
parent 50fa352212
commit a0535365da
2 changed files with 5 additions and 4 deletions

View File

@ -9,7 +9,7 @@
import CreateEditRow from "./modals/CreateEditRow.svelte" import CreateEditRow from "./modals/CreateEditRow.svelte"
import CreateEditUser from "./modals/CreateEditUser.svelte" import CreateEditUser from "./modals/CreateEditUser.svelte"
import CreateEditColumn from "./modals/CreateEditColumn.svelte" import CreateEditColumn from "./modals/CreateEditColumn.svelte"
import { TableNames, UNEDITABLE_USER_FIELDS } from "constants" import { TableNames, UNEDITABLE_USER_FIELDS, BUDIBASE_INTERNAL_DB } from "constants"
import RoleCell from "./cells/RoleCell.svelte" import RoleCell from "./cells/RoleCell.svelte"
export let schema = {} export let schema = {}
@ -28,6 +28,7 @@
let editColumnModal let editColumnModal
let customRenderers = [] let customRenderers = []
$: isInternal = tableId === BUDIBASE_INTERNAL_DB
$: isUsersTable = tableId === TableNames.USERS $: isUsersTable = tableId === TableNames.USERS
$: data && resetSelectedRows() $: data && resetSelectedRows()
$: editRowComponent = isUsersTable ? CreateEditUser : CreateEditRow $: editRowComponent = isUsersTable ? CreateEditUser : CreateEditRow
@ -124,7 +125,7 @@
bind:selectedRows bind:selectedRows
allowSelectRows={allowEditing && !isUsersTable} allowSelectRows={allowEditing && !isUsersTable}
allowEditRows={allowEditing} allowEditRows={allowEditing}
allowEditColumns={allowEditing} allowEditColumns={allowEditing && isInternal}
showAutoColumns={!hideAutocolumns} showAutoColumns={!hideAutocolumns}
on:editcolumn={e => editColumn(e.detail)} on:editcolumn={e => editColumn(e.detail)}
on:editrow={e => editRow(e.detail)} on:editrow={e => editRow(e.detail)}

View File

@ -15,7 +15,7 @@
$params.selectedDatasource !== BUDIBASE_INTERNAL_DB $params.selectedDatasource !== BUDIBASE_INTERNAL_DB
function selectFirstDatasource({ detail }) { function selectFirstDatasource({ detail }) {
$goto("./datasource") $goto("./table")
} }
</script> </script>
@ -27,7 +27,7 @@
<div class="tab-content-padding"> <div class="tab-content-padding">
<DatasourceNavigator /> <DatasourceNavigator />
<Modal bind:this={modal}> <Modal bind:this={modal}>
<CreateDatasourceModal /> <CreateDatasourceModal />
</Modal> </Modal>
</div> </div>
</Tab> </Tab>