Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
installed() {
const ele = this.shadowRoot.querySelector('.m-spreadsheet')
document.body.appendChild(ele)
const s = new XSpreadsheet(document.querySelector('.m-spreadsheet'), {
view: {
height: () => {
if (this.props.height) return this.props.height
return document.documentElement.clientHeight
},
width: () => {
if (this.props.width) return this.props.width
return document.documentElement.clientWidth
}
},
})
.loadData(this.props.data || {}) // load data
.change(data => {
this.fire('change', data)
});