Angular - клавиатура: ложное свойство не работает - PullRequest
0 голосов
/ 18 марта 2020

Да, почему, но даже с клавиатурой: false, я все еще могу закрыть мой мод с "es c". Понимаю, что я делаю не так, почти уверен, что здесь чего-то не хватает, c здесь, это мой component.ts, кстати.

  **async open(content, approved) {
    const modalRef = await this.modalService.open(content, {
      centered: true,
      size: 'lg',
      backdrop: 'static',
      keyboard: false
    });**
    modalRef.result.then(async res => {
      if (approved) {
        this.producOneService.approve(this.date, this.tipo, res)
        .then(res => {
          this.activeModal.close();
        }).catch(err => {
          // toast msg de erro
          this.activeModal.close();
        });
      } else {
        this.producOneService.reprove(this.date, this.tipo, res)
        .then(res => {
          this.activeModal.close();
        }).catch(err => {
          // toast msg de erro
          this.activeModal.close();
        });
      }
    });
  }

  async cancel() {
    await this.activeModal.close();
  }
}
...