datagrid icon indicating copy to clipboard operation
datagrid copied to clipboard

Ajax request is displayed in url

Open digiwirtual opened this issue 4 months ago • 0 comments

All requests marked with the .ajax class are processed correctly, with one small detail — the href link is also displayed in the URL. Naja implements a HistoryHandler, which should be disabled either globally using naja.defaultOptions.history = false; or per request using naja.makeRequest('POST', '/ping', null, { history: false });

Another option is adding ->setDataAttribute('naja-history', 'off') to all buttons using ajax.

Reason: When the user refreshes the page after an AJAX request that displays the href link in the URL, the request is processed a second time.

digiwirtual avatar Oct 10 '25 16:10 digiwirtual