Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Huge gap when using flex #190

Open
Eikosa opened this issue Jul 19, 2023 · 0 comments
Open

Huge gap when using flex #190

Eikosa opened this issue Jul 19, 2023 · 0 comments

Comments

@Eikosa
Copy link

Eikosa commented Jul 19, 2023

How can i fix?

output:

msedge_bdamq422ox.mp4

Code:

<html>
  <head>
    <script src="https://cdn.jsdelivr.net/npm/[email protected]/clusterize.min.js"></script>
    <link href="https://cdn.jsdelivr.net/npm/[email protected]/clusterize.min.css" rel="stylesheet">
    <style>
      .list {
        display: flex;
        flex-wrap: wrap;
      }
      .item {
        width: 100px;
        height: 100px;
        border: 1px solid black;
        margin: 5px;
      }
    </style>
  </head>
  <body>
    <div id="scrollArea" class="clusterize-scroll">
      <div id="contentArea" class="clusterize-content" style="display: flex; flex-wrap: wrap;">
        <div class="list"></div>
      </div>
    </div>
    <script>
      // Generate some dummy data
      var data = [];
      for (var i = 0; i < 1000; i++) {
        data.push('<div class="item">' + i + '</div>');
      }

      // Initialize Clusterize.js
      var clusterize = new Clusterize({
        scrollId: 'scrollArea',
        contentId: 'contentArea',
        rows_in_block: 50,
        tag: 'div'
      });

      // Update the list with data
      clusterize.update(data);
    </script>
  </body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant