HM-92 Добавил рендер страницы после создания апи и добавил отображение текста ошибки (#35)
This commit is contained in:
@ -3,6 +3,8 @@ import TableComponent from '../table-component';
|
||||
import storageApi from '../../api/StorageServiceAPI';
|
||||
import FilterApiComponent from '../search-component/index';
|
||||
import ApiInfoComponent from '../api-info-component/index';
|
||||
import CreateApiComponent from '../create-api-component/index';
|
||||
import ButtonComponent from '../button-component/ButtonComponent';
|
||||
|
||||
class ApiPage extends Component {
|
||||
constructor (mainNodeSelector, parentNode) {
|
||||
@ -11,10 +13,19 @@ class ApiPage extends Component {
|
||||
this.filterBox = new FilterApiComponent(this.mainNode);
|
||||
this.storageListTable = new TableComponent(this.mainNode);
|
||||
this.infoBox = new ApiInfoComponent();
|
||||
this.createWindow = new CreateApiComponent();
|
||||
this.addSubscribe(this.storageListTable, 'showInfo', (obj) => {
|
||||
this.infoBox.render(obj);
|
||||
});
|
||||
|
||||
this.createBtn = new ButtonComponent(this.filterBox.filterButtonBox, '✚', 'btn btn-primary mb-3 Create__btn');
|
||||
this.addSubscribe(this.createBtn, 'click', () => {
|
||||
this.createWindow.show();
|
||||
});
|
||||
this.addSubscribe(this.createWindow, 'renderTable', () => {
|
||||
this.initStorageListTable();
|
||||
});
|
||||
|
||||
this.initStorageListTable();
|
||||
|
||||
this.addSubscribe(this.infoBox, 'deleteApi', () => {
|
||||
|
||||
Reference in New Issue
Block a user