html cell view

This commit is contained in:
Jan Prochazka
2022-02-03 15:23:24 +01:00
parent d32ec5ecb1
commit 2bc84cb80b
2 changed files with 20 additions and 2 deletions

View File

@@ -0,0 +1,13 @@
<script lang="ts">
import _ from 'lodash';
export let selection;
</script>
{@html selection
.map(cell => {
const { value } = cell;
if (_.isPlainObject(value) || _.isArray(value)) return JSON.stringify(value, undefined, 2);
return cell.value;
})
.join('\n')}