phone search keep original value
This commit is contained in:
@@ -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,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user