@contributte/datagrid 0.0.0-20260106-5d3883b → 0.0.0-20260107-f4445c3

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.
@@ -118,7 +118,8 @@ export class NajaAjax<C extends Naja = Naja, G extends Datagrid = Datagrid> exte
118
118
  }
119
119
 
120
120
  async request<D = {}, P = DatagridPayload>(args: RequestParams<D>): Promise<P> {
121
- return await this.client.makeRequest(args.method, args.url, args.data) as P;
121
+ const options = { history: false, ...args.options };
122
+ return await this.client.makeRequest(args.method, args.url, args.data ?? null, options) as P;
122
123
  }
123
124
 
124
125
  async submitForm<E extends HTMLFormElement = HTMLFormElement, P = Payload>(element: E): Promise<P> {
@@ -28,6 +28,7 @@ document.addEventListener("DOMContentLoaded", () => {
28
28
  .forEach(el => new Dropdown(el))
29
29
 
30
30
  // Initialize Naja (nette ajax)
31
+ naja.defaultOptions.history = false;
31
32
  naja.formsHandler.netteForms = netteForms;
32
33
  naja.initialize();
33
34
 
@@ -7,7 +7,8 @@ export interface BaseRequestParams {
7
7
  }
8
8
 
9
9
  export interface RequestParams<D = any> extends BaseRequestParams {
10
- data: D;
10
+ data?: D;
11
+ options?: Record<string, any>;
11
12
  }
12
13
 
13
14
  export interface DatagridPayload {