fix: phone field type hidden property break form load (#17426)
Co-authored-by: Shariq Ansari <30859809+shariquerik@users.noreply.github.com>
This commit is contained in:
parent
010a436569
commit
f972bb320b
1 changed files with 2 additions and 1 deletions
|
|
@ -22,7 +22,7 @@ frappe.ui.form.ControlPhone = class ControlPhone extends frappe.ui.form.ControlD
|
|||
// Replaces code when selected and removes previously selected.
|
||||
this.country_code_picker.on_change = (country) => {
|
||||
if (!country) {
|
||||
return this.reset_inputx();
|
||||
return this.reset_input();
|
||||
}
|
||||
const country_code = frappe.boot.country_codes[country].code;
|
||||
const country_isd = frappe.boot.country_codes[country].isd;
|
||||
|
|
@ -119,6 +119,7 @@ frappe.ui.form.ControlPhone = class ControlPhone extends frappe.ui.form.ControlD
|
|||
}
|
||||
|
||||
reset_input() {
|
||||
if (!this.$input) return;
|
||||
this.$input.val("");
|
||||
this.$wrapper.find('.country').text("");
|
||||
if (this.selected_icon.find('svg').hasClass('hide')) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue