Skip to content

pagination buttons will trigger form post #1248

@tekken22

Description

@tekken22

Describe the bug
when grid is used inside of form tag (aspx page, asp.net, form required) it will trigger postback because button type is not specified
and default is type=submit.

To Reproduce
have grid container inside of the form tags and use client side grid with local array as data source but with pagination (no server side calls) and click next.

Expected behavior
grid loads next page, it works fine but immideately after that a form submit occures and entire page is reloaded.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 10 Pro
  • Browser: Microsoft Edge
  • Version: 108.0.1462.42 (Official build) (64-bit)

Additional context
this will fix the issue if called after grid is rendered.
code:
document.getElementById("divLog").querySelectorAll('[role="button"]').forEach(function (el) {
el.setAttribute("type", "button");
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug fixSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions