Skip to content

How do I listen to my own events for dynamic modal? #338

@alimuradov

Description

@alimuradov

Version

vue-final-modal: 4.0.6
vue: 3.2.45

OS

Ubuntu

Please help me figure out how to listen to events. In the old version, I could assign my own emits myself.
Here is an example from version 3.0
const editPerson = (idPerson: string) => {

  $vfm.show({
    component: PersonEditFrom,
    bind: {
      personId: idPerson,
    },
    on: {
      "after-edit-person": afterEditPerson,
    },
  });
};

In version 4 using useModal() I don't understand how to do the same.

const editPatient = useModal({
  component: PatientEditForm,
  attrs: {
    patientId: "",
    afterEdit() {
      console.log('dfdfdf');
    },
  },
});

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions