feat: selected table class
This commit is contained in:
		
							parent
							
								
									3f85aa3ce2
								
							
						
					
					
						commit
						60fe2ac521
					
				
							
								
								
									
										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