feat: selected table class
This commit is contained in:
parent
c34945b7d3
commit
f9728c33f1
15
src/Models/SelectedTable.js
Normal file
15
src/Models/SelectedTable.js
Normal file
@ -0,0 +1,15 @@
|
||||
class SelectedTable {
|
||||
constructor (props) {
|
||||
this.table = props.table
|
||||
}
|
||||
|
||||
getHeaders = () => {
|
||||
const rows = this.table.rows
|
||||
const length = rows.length
|
||||
let lengthToSlice = 49
|
||||
if (length < 50) lengthToSlice = length - 1
|
||||
const firstSliceOfRows = rows.slice(0, lengthToSlice)
|
||||
console.log(firstSliceOfRows)
|
||||
// const uniqueHeaderSet = new Set(firstSliceOfRows)
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user