@@ -732,7 +732,7 @@ func (afo *GormAdminFilterObjects) Search(field *Field, searchString string) {
732
732
afo .SetFullQuerySet (fullGormOperatorContext .Tx )
733
733
afo .SetPaginatedQuerySet (fullGormOperatorContext .Tx )
734
734
afo .SetLastError (afo .PaginatedGormQuerySet .GetLastError ())
735
- } else {
735
+ } else if ( fieldType == reflect . Uint ) || ( fieldType == reflect . Uint64 ) || ( fieldType == reflect . Uint32 ) || ( fieldType == reflect . Int64 ) || ( fieldType == reflect . Int ) || ( fieldType == reflect . Int32 ) || ( fieldType == reflect . Float32 ) || ( fieldType == reflect . Float64 ) {
736
736
operator := IContainsGormOperator {}
737
737
gormOperatorContext := NewGormOperatorContext (afo .GetFullQuerySet (), afo .GetCurrentModel ())
738
738
operator .Build (afo .GetUadminDatabase ().Adapter , gormOperatorContext , field , searchString , & SQLConditionBuilder {Type : "or" })
@@ -741,6 +741,15 @@ func (afo *GormAdminFilterObjects) Search(field *Field, searchString string) {
741
741
operator .Build (afo .GetUadminDatabase ().Adapter , gormOperatorContext , field , searchString , & SQLConditionBuilder {Type : "or" })
742
742
afo .SetPaginatedQuerySet (gormOperatorContext .Tx )
743
743
afo .SetLastError (afo .PaginatedGormQuerySet .GetLastError ())
744
+ } else {
745
+ operator := ExactGormOperator {}
746
+ gormOperatorContext := NewGormOperatorContext (afo .GetFullQuerySet (), afo .GetCurrentModel ())
747
+ operator .Build (afo .GetUadminDatabase ().Adapter , gormOperatorContext , field , searchString , & SQLConditionBuilder {Type : "or" })
748
+ afo .SetFullQuerySet (gormOperatorContext .Tx )
749
+ gormOperatorContext = NewGormOperatorContext (afo .GetPaginatedQuerySet (), afo .GetCurrentModel ())
750
+ operator .Build (afo .GetUadminDatabase ().Adapter , gormOperatorContext , field , searchString , & SQLConditionBuilder {Type : "or" })
751
+ afo .SetPaginatedQuerySet (gormOperatorContext .Tx )
752
+ afo .SetLastError (afo .PaginatedGormQuerySet .GetLastError ())
744
753
}
745
754
}
746
755
0 commit comments