Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

simplemattable

Package Overview
Dependencies
Maintainers
1
Versions
180
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simplemattable - npm Package Compare versions

Comparing version 0.7.0 to 0.7.1

2

package.json
{
"name": "simplemattable",
"version": "0.7.0",
"version": "0.7.1",
"description": "A simplified, declarative table-library using @angular/material's MatTable",

@@ -5,0 +5,0 @@ "author": "Henning Wobken",

@@ -116,2 +116,27 @@ # simplemattable

### Dynamic updates
Due to the data binding, the data as well as the table column definitions can be updated dynamically.
To update the table columns, simply change/add/remove the table columns in your table column array.
For example, if you want to toggle the visiblility of the first column:
```
this.columns[0].visible = !this.columns[0].visible;
```
Simplemattable will recognize any changes to the properties of any of the supplied columns or to the column array.
Changing the data is a bit different. Performing the checks to recognize any changes on the fly would take up too much performance on large tables with complex models.
Therefore, the default Angular check is used, which compares the array references via ===. This means that you have to change the array reference.
If you have a table with the complex model described earlier, you could add a new entry using this:
```
this.testData.push(new ComplexTestData(42, 'New Entry', new TestData('key', 'value')));
this.testData = this.testData.slice(0);
```
Note that .slice(0) is one of the fastest, if not the fastest way to clone arrays.
For more information, see [this StackOverflow question](https://stackoverflow.com/questions/3978492/javascript-fastest-way-to-duplicate-an-array-slice-vs-for-loop).
### TableColumn Options

@@ -118,0 +143,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc