first success with x-data-spreadsheet
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
19
frontend/src/routes/calc.svelte
Normal file
19
frontend/src/routes/calc.svelte
Normal file
@@ -0,0 +1,19 @@
|
||||
<script>
|
||||
import { onMount } from 'svelte';
|
||||
import Spreadsheet from "x-data-spreadsheet";
|
||||
|
||||
function load(){
|
||||
const s = new Spreadsheet("#example-table")
|
||||
.loadData({}) // load data
|
||||
.change(data => {
|
||||
// save data to db
|
||||
});
|
||||
|
||||
// data validation
|
||||
s.validate()
|
||||
}
|
||||
|
||||
onMount(load);
|
||||
</script>
|
||||
|
||||
<div id="example-table"></div>
|
||||
Reference in New Issue
Block a user