phone search keep original value

This commit is contained in:
Yuri Kuznetsov
2023-11-09 21:19:07 +02:00
parent f3f797a7cf
commit e1c101b786
2 changed files with 7 additions and 0 deletions
+3
View File
@@ -551,6 +551,8 @@ class PhoneFieldView extends VarcharFieldView {
.toString()
.trim();
const originalValue = value;
if (isNumeric && value) {
value = value.replace(/[^0-9]/g, '');
}
@@ -565,6 +567,7 @@ class PhoneFieldView extends VarcharFieldView {
attribute: name,
data: {
type: type,
value: originalValue,
},
};
}
+4
View File
@@ -236,6 +236,10 @@ class VarcharFieldView extends BaseFieldView {
if (typeof this.searchParams.value === 'string') {
this.searchData.value = this.searchParams.value;
}
if (this.searchParams.data && typeof this.searchParams.data.value === 'string') {
this.searchData.value = this.searchParams.data.value;
}
}
data.noSpellCheck = this.noSpellCheck;