I'm new to using the ES6 classes
, I'm trying to figure out how to group methods within a class I'm creating for a Table
so methods such as sort, resize, etc...
class Table extends someClass{
myMethods(){
//BLAH
}
var column={
sort:()=>{
console.log('firing');
},
resize:{
mousedown:()=>{
},
mousemove:()=>{
},
mouseup:()=>{
},
mouseout:()=>{
}
}
},
var cells={
edit:()=>{
console.log('firing');
}
}
}
//ERROR (Unexpected Identifier)
The problem is the Table
class is already extending the (default base class) someClass
and I would say extends Column
class or something but I can't since it already is extending the base class.
Question: How can I organize my methods sort
,resize
inside a Class which already extends another class? (or is this non-standard, and if so please provide the proper way.)