npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

gridster-item-extend

v2.0.3

Published

Extensions of angular-gridster2 for overide functionality

Downloads

9

Readme

gridster-item-extend

Extension of angular-gridster2 library.

Install

npm i gridster-item-extend

Angular v13.x support

Example

Without gridster-item-extend | :-------------------------:| normal gridster-item | With gridster-item-extend | auto gridster-item |

  • gridster-item-extend Library can Auto update height and remove scroll.

How to use

Module import Declaration

  • src/app/app.module.ts
@NgModule({
  imports: [
    GridsterItemExtendModule,
    GridsterModule
  ]
  ...
})
export class AppModule { }

How to use in HTML files

<gridster [options]="options">
  <gridster-item-extend [item]="item" *ngFor="let item of dashboard">
    <div>
      <h2>raj</h2>
    </div>
  </gridster-item-extend>
</gridster>
  • src/app/app.component.ts
import { GridsterItemExtendComponent } from 'gridster-item-extend';
@ViewChildren(GridsterItemExtendComponent) gridstersItem : QueryList<GridsterItemExtendComponent>;

ngOnInit(): void {
  this.options = {
    /* Default value : false;
    * If customLoadItems is not given then it will work as normal 
    * gridster-item component
    * 
    * If customLoadItems set to true then you can control loading of
    * gridster-item-extend component
    */
    customLoadItems: true,
    ....
    // Add more cols and rows so gridster can push down / shift other widgets
    minCols: 100,
    maxCols: 1000,
    minRows: 100,
    maxRows: 1000,
    ...
  }
}
ngAfterViewInit(){
    this.loadGridsterItemAutoHeight();
}
loadGridsterItem(){
  // child node list 
  this.gridsterItems.forEach(item=> {
    // call method to load gridster item
    item.loadCurrentGridsterItem()
  })
}
// Use this function call in/after ngAfterViewInit life cycle
loadGridsterItemAutoHeight(){
  this.gridsterItems.forEach(item=> {
    // Child element height;
    const height = item.el.querySelector('div').offsetHeight;
    // setNewRow function calculate new rows for current item
    item.setNewRow(height);
    item.loadCurrentGridsterItem();
  })
}

Browser support

What Angular supports here

License

The MIT License

Copyright (c) 2022 rajratna maitry