vasuzex 2.3.3 → 2.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -139,6 +139,11 @@ export class BaseApp extends Application {
|
|
|
139
139
|
* Core middleware for parsing JSON and URL-encoded request bodies
|
|
140
140
|
*/
|
|
141
141
|
setupBodyParsing() {
|
|
142
|
+
// Configure query parser to support nested bracket notation (e.g. filters[name]=value)
|
|
143
|
+
// Express 5 defaults to 'simple' (Node's querystring) which does not parse brackets
|
|
144
|
+
// 'extended' uses qs.parse which correctly handles nested objects
|
|
145
|
+
this.express.set('query parser', 'extended');
|
|
146
|
+
|
|
142
147
|
// Parse JSON request bodies
|
|
143
148
|
this.express.use(express.json());
|
|
144
149
|
|
|
@@ -186,10 +186,10 @@ export function DataTable(props) {
|
|
|
186
186
|
// Only add non-default values to keep URL clean
|
|
187
187
|
if (state.page !== 1) params.set('page', state.page);
|
|
188
188
|
if (state.sortBy) params.set('sortBy', state.sortBy);
|
|
189
|
-
if (state.sortOrder !==
|
|
189
|
+
if (state.sortOrder !== initialSortOrder) params.set('sortOrder', state.sortOrder);
|
|
190
190
|
if (state.search) params.set('search', state.search);
|
|
191
191
|
if (state.statusFilter !== 'all') params.set('statusFilter', state.statusFilter);
|
|
192
|
-
if (state.limit !== 10) params.set('limit', state.limit);
|
|
192
|
+
if (state.limit !== (initialLimit || 10)) params.set('limit', state.limit);
|
|
193
193
|
|
|
194
194
|
// Add column search params
|
|
195
195
|
Object.entries(state.columnSearch || {}).forEach(([field, value]) => {
|