View Render
View Render
- Triggered when a view has completed rendering
- Keep in mind that if you use knack-view-render.any, your code will be execute once for each view on each page, so a page with four views will run the same code four times.
// Change "view_1" to the view you want to listen for
$(document).on('knack-view-render.view_1', function(event, view, data) {
// Do something after the view renders
alert('listener for view: ' + view.key);
});
Events
Event | Description |
---|---|
knack-view-render.any | Triggered by all views |
knack-view-render.view_1 | Triggered by a single view specified by key |
knack-view-render.type | Triggered by all views of the specified type. Replace “type” with form, menu, search, list, calendar, search, or details |
Parameters
Parameter | Description |
---|---|
view | The view (JSON object) |
data | Array of the records currently visible (JSON objects) |
Updated almost 4 years ago
What’s Next