Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
gridjs-angular
Advanced tools
Angular wrapper for Grid.js
npm install gridjs gridjs-angular
In your module
import { GridjsAngularModule } from 'gridjs-angular';
@NgModule({
imports: [CommonModule,GridjsAngularModule],
declarations: [...],
exports: [...],
})
export class AppModule {}
In your component template
import { Component } from '@angular/core';
import { GridJsConfig } from 'gridjs-angular';
@Component({
template: `
<gridjs-angular
[gridConfig]="gridConfig"
(cellClick)="handleCellClick($event)"
(rowClick)="handleRowClick($event)"
(beforeLoad)="handleBeforeLoad($event)"
(gridLoad)="handleGridLoad($event)"
></gridjs-angular>
`
})
class ExampleComponent {
public gridConfig: GridJsConfig = {
columns: ['Name', 'Email', 'Phone Number'],
data: [
['John', 'john@example.com', '(353) 01 222 3333'],
['Mark', 'mark@gmail.com', '(01) 22 888 4444'],
['Eoin', 'eoin@gmail.com', '0097 22 654 00033'],
['Sarah', 'sarahcdd@gmail.com', '+322 876 1233'],
['Afshin', 'afshin@mail.com', '(353) 22 87 8356']
]
};
handleCellClick(event: any) {
console.log('cellClicked', event);
}
handleRowClick(event: any) {
console.log('rowClicked', event);
}
handleBeforeLoad(event: any) {
console.log('beforeLoad', event);
}
handleGridLoad(event: any) {
console.log('load', event);
}
}
Finally don't forget to add gridjs theme in your index.html
<link
href="https://unpkg.com/gridjs/dist/theme/mermaid.min.css"
rel="stylesheet"
/>
You can pass all Grid.js configs to the <gridjs-angular>
component as inputs. See Grid.js Config for more details.
gridConfig
You can pass Grid.js config as one object and it will be merged with other Grid.js inputs.
plugins
Grid.js plugins array. See Grid.js Plugins
load
event renamed to beforeLoad
. See Grid.js Eventsh
function is working fine. See this example plugin. {
id: 'myplugin',
component: h(() => h('h1', {}, 'Hello world!'), {}),
position: PluginPosition.Header,
}
html
in column formatter like this. {
name: 'Email',
formatter: (_, row) => html(
`<a href='mailto:${row.cells[1].data}'>${row.cells[1].data}</a>`
)
}
FAQs
Angular wrapper for [Grid.js](https://github.com/grid-js/gridjs)
The npm package gridjs-angular receives a total of 170 weekly downloads. As such, gridjs-angular popularity was classified as not popular.
We found that gridjs-angular demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.