Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (columnMinSizes !== prevColumnMinSizes) {
needsRecreate = true
}
if (rowMinSizes !== prevRowMinSizes) {
needsRecreate = true
}
// Destroy and re-create split if options changed
if (needsRecreate) {
options.columnMinSizes = columnMinSizes
options.rowMinSizes = rowMinSizes
this.split.destroy(false)
this.split = Split(options)
}
}
componentDidMount() {
const { children, ...options } = this.props
options.writeStyle = this.writeStyle
options.onDrag = this.onDrag
this.split = Split(options)
}
initSplit() {
this.destroySplit();
this.split = Split({
[this.needsColumnLayout ? 'columnGutters' : 'rowGutters']: [
{
track: 1,
element: this.$refs.gutter,
},
],
minSize: this.minSize,
});
},