Prevent adding rows to users table and remove log
This commit is contained in:
parent
a25af10c0e
commit
df757ce09b
|
@ -21,7 +21,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<Sheet {API} tableId={id}>
|
<Sheet {API} tableId={id} allowAddRows={!isUsersTable}>
|
||||||
<svelte:fragment slot="controls">
|
<svelte:fragment slot="controls">
|
||||||
<SheetCreateColumnButton />
|
<SheetCreateColumnButton />
|
||||||
{#if !isUsersTable}
|
{#if !isUsersTable}
|
||||||
|
|
|
@ -82,7 +82,6 @@ export const createReorderStores = context => {
|
||||||
let sourceIdx = $columns.findIndex(x => x.name === sourceColumn)
|
let sourceIdx = $columns.findIndex(x => x.name === sourceColumn)
|
||||||
let targetIdx = $columns.findIndex(x => x.name === targetColumn)
|
let targetIdx = $columns.findIndex(x => x.name === targetColumn)
|
||||||
targetIdx++
|
targetIdx++
|
||||||
console.log(sourceIdx, targetIdx)
|
|
||||||
columns.update(state => {
|
columns.update(state => {
|
||||||
const removed = state.splice(sourceIdx, 1)
|
const removed = state.splice(sourceIdx, 1)
|
||||||
if (--targetIdx < sourceIdx) {
|
if (--targetIdx < sourceIdx) {
|
||||||
|
|
Loading…
Reference in New Issue