@@ -87,6 +87,32 @@ export function findFilteringFieldsUtil(
8787 value : filters [ `f_${ fieldname } __empty` ] ,
8888 } ) ;
8989 }
90+
91+ if ( isObjectPropertyExists ( filters , `f_${ fieldname } __in` ) ) {
92+ const rawValue = filters [ `f_${ fieldname } __in` ] ;
93+ filteringItems . push ( {
94+ field : fieldname ,
95+ criteria : FilterCriteriaEnum . in ,
96+ value : Array . isArray ( rawValue )
97+ ? rawValue
98+ : String ( rawValue )
99+ . split ( ',' )
100+ . map ( ( v ) => v . trim ( ) ) ,
101+ } ) ;
102+ }
103+
104+ if ( isObjectPropertyExists ( filters , `f_${ fieldname } __between` ) ) {
105+ const rawValue = filters [ `f_${ fieldname } __between` ] ;
106+ filteringItems . push ( {
107+ field : fieldname ,
108+ criteria : FilterCriteriaEnum . between ,
109+ value : Array . isArray ( rawValue )
110+ ? rawValue
111+ : String ( rawValue )
112+ . split ( ',' )
113+ . map ( ( v ) => v . trim ( ) ) ,
114+ } ) ;
115+ }
90116 }
91117 return filteringItems ;
92118}
@@ -99,7 +125,7 @@ export function parseFilteringFieldsFromBodyData(
99125 const rowNames = tableStructure . map ( ( el ) => el . column_name ) ;
100126 rowNames . forEach ( ( rowName ) => {
101127 if ( isObjectPropertyExists ( filtersDataFromBody , rowName ) ) {
102- const filterData = filtersDataFromBody [ rowName ] as Record < string , string > ;
128+ const filterData = filtersDataFromBody [ rowName ] as Record < string , unknown > ;
103129 for ( const key in filterData ) {
104130 if ( ! validateStringWithEnum ( key , FilterCriteriaEnum ) ) {
105131 throw new Error ( `Invalid filter criteria: "${ key } ".` ) ;
0 commit comments