Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessing dialog buttons through ref #35

Closed
jfrag opened this issue Dec 9, 2020 · 0 comments
Closed

Accessing dialog buttons through ref #35

jfrag opened this issue Dec 9, 2020 · 0 comments

Comments

@jfrag
Copy link
Contributor

jfrag commented Dec 9, 2020

Hi,

I want to access dialog actions buttons from dialog object but $dialog buttons_ propertie is empty

<ui-dialog ref="dialogCreate" class="mdc-dialog--not-scrollable" v-model="dialogCreateOpen">
  <ui-dialog-title><?= _('New user') ?></ui-dialog-title>
  <ui-dialog-content class="pt2">
    <ui-form type="|">
      <ui-form-field>
        <ui-autocomplete v-model="addUser.name" :source="addUserSource" fullwidth remote required outlined delay="500" @search="searchUserCreate" @selected="onSelectUser"><?= _('Name') ?></ui-autocomplete>
      </ui-form-field>
      <ui-form-field>
        <ui-select outlined fixed fullwidth v-model="addUser.role" :options="roles"><?= _('Role') ?></ui-select>
      </ui-form-field>
    </ui-form>
  </ui-dialog-content>
  <ui-dialog-actions>
    <ui-button @click="closeDialogCreate"><?= _('Cancel') ?></ui-button>
    <ui-button @click="saveDialogCreate"><?= _('Save') ?></ui-button>
  </ui-dialog-actions>
</ui-dialog>
export default {
  methods: {
    closeDialogCreate() {
      console.log(this.$ref.dialogCreate.buttons_) //undefined
    }
  }
}

I didn't find a solution for accessing dialog buttons on $dialog object too

Any solution ?

Thank's

@jfrag jfrag closed this as completed Dec 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant