Created by @e2221 in Q&As
@e2221
@e2221

How can I disable animation when I call link to any handler in js this way:

di.getService('page').open(link)

or:

di.getService("ajax").post(editableLink, { value: newValue, columnName: columnName });

Something like if make this:

 <a n:href="myHandler!" data-transition="false">
@jahudka
@jahudka

Hi, using page.open() you can use the context parameter:

di.getService('page').open(url, method, data, context);

The context parameter is an object and one of the properties you can specify is trasition, which has the same semantics as the data-transition attribute, so you can specify a selector or a list of comma-separated selectors of element(s) you wish to animate, or false to disable transitions altogether for the request.

The ajax service itself doesn't itself trigger transitions - its only responsibility is sending the actual HTTP request, it doesn't know anything about transitions and such, so ajax.post() directly should never trigger a transition. If it does, well, that's something I'd like to know about! :-)

@e2221
@e2221

Thank you. You are right - ajax.post() is not triggering a transition. :-)

Sign in to post a reply