keevo-components 1.5.195 → 1.5.196

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -793,8 +793,9 @@ class BaseComponentCrudForm extends BaseComponentCrud {
793
793
  * Método responsável pelo carregamento da tela
794
794
  * @param obs - Observable responsável pelo salvamento dos dados
795
795
  */
796
- async loadData(obs) {
797
- await obs.pipe(loading())
796
+ loadData(obs) {
797
+ obs
798
+ .pipe(loading())
798
799
  .subscribe((data) => {
799
800
  this.isNewRegistry = false;
800
801
  this.registry = data;
@@ -803,6 +804,15 @@ class BaseComponentCrudForm extends BaseComponentCrud {
803
804
  this.setTitlePopup();
804
805
  });
805
806
  }
807
+ async loadDataAsync(obs) {
808
+ await obs.pipe(loading()).toPromise();
809
+ const data = await obs.toPromise();
810
+ this.isNewRegistry = false;
811
+ this.registry = data;
812
+ this.setFormValues(this.registry); // Mova a lógica de preenchimento do formulário aqui
813
+ this.loadGrids();
814
+ this.setTitlePopup();
815
+ }
806
816
  loadGrids() { }
807
817
  /**
808
818
  * Método disparado para retornar a lista