fix: set primary action after clearing previous action (#17454)

This commit is contained in:
vorasmit 2022-07-12 21:06:52 +05:30 committed by GitHub
parent 7a59fc7ecf
commit ff734532aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -145,7 +145,8 @@ frappe.ui.Dialog = class Dialog extends frappe.ui.FieldGroup {
return this.get_primary_btn()
.removeClass("hide")
.html(label)
.click(function() {
.off('click')
.on('click', function() {
me.primary_action_fulfilled = true;
// get values and send it
// as first parameter to click callback