Skip to content

RowSelection Plugin Example does not show checkboxes in Table #1482

Open
@JosefSommerauer

Description

@JosefSommerauer

I try do get this javascript snipped to work. It shows no error but i also dont see a checkbox element. only a empty column...
js code
Screenshot 2024-10-18 213157

new gridjs.Grid({
    columns: [
      {
        id: 'myCheckbox',
        name: 'Select',
        plugin: {
          // install the RowSelection plugin
          component: gridjs.plugins.selection.RowSelection
        }
      },
      'Email',
  ],
  data: [
    ["John", "[email protected]"     ],
    ["Mark", "[email protected]"       ],
    ["Eoin", "[email protected]"       ],
    ["Sarah", "[email protected]"  ],
    ["Afshin", "[email protected]"    ],
  ],
  sort: true
}).render(document.getElementById("wrapper"));

html code

<!DOCTYPE html>
<html lang="en">
  <head>
    <link
      href="https://unpkg.com/gridjs/dist/theme/mermaid.min.css"
      rel="stylesheet"
    />
  </head>
  <body>
    <div id="wrapper"></div>


    <script src="https://unpkg.com/gridjs/dist/gridjs.umd.js"></script>
    <script src="https://unpkg.com/gridjs/plugins/selection/dist/selection.umd.js"></script>
    <script src="index.js"></script>
  </body>
</html>

<script>

</script>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions