cleaning up javascript code
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
<script>
|
||||
import { activeField } from './field_sync.svelte.js';
|
||||
import { t } from '../translations.svelte.js';
|
||||
import { t } from '../translations.svelte.js';
|
||||
|
||||
let {
|
||||
editable = false,
|
||||
onclick = evt => {},
|
||||
onSet = newVal => {return true;},
|
||||
type = 'div',
|
||||
value = $bindable(null)
|
||||
onclick = evt => {},
|
||||
onSet = newVal => {return true;},
|
||||
type = 'div',
|
||||
value = $bindable(null)
|
||||
} = $props();
|
||||
|
||||
let editing = $state(false);
|
||||
let editing = $state(false);
|
||||
let editValue = $state(value);
|
||||
let timer = null;
|
||||
let start = 0;
|
||||
let timer = null;
|
||||
let start = 0;
|
||||
|
||||
async function applyEdit(){
|
||||
let success = await onSet(editValue);
|
||||
@@ -22,7 +22,7 @@
|
||||
}
|
||||
|
||||
function resetEdit(){
|
||||
editing = false;
|
||||
editing = false;
|
||||
editValue = value;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user