Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
3879 Näkymät
class FavoriteMenu extends DropdownMenu {
 constructor() {
super(...arguments);
this.model = useModel('searchModel');              this.state.deletedFavorite = false;
}
}

I want to extend the constructor of `FavoriteMenu` .. like adding console.log after super(...arguments)

So the result would be redefining the main constructor in  custom file but the result is obtained in the main file

I've tried `FavoriteMenu.include` and `FavoriteMenu.prototype.cconstructor`but they didn't work


any hint?

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
2
maalisk. 24
7169
0
tammik. 21
8536
2
kesäk. 22
11537
0
lokak. 22
571
1
elok. 21
4542