
Security News
New React Server Components Vulnerabilities: DoS and Source Code Exposure
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.
wc-grid-table
Advanced tools
wc-grid-table (short: wgt) is a Free and Open-Source, CSS-Grid, Table WebComponent. The goal of this WebComponent is high customizability and a low barrier to entry. It uses no dependencys (lodash.debounce as optional plugin) and is only around 7kB (unzipped, minified) in size.
Install via npm:
npm install wc-grid-table
Use via CDN:
<scirpt src="https://unpkg.com/wc-grid-table@1.0.3/dist/standalone/bundle.min.js"></script>
First install all dev-dependecies:
npm install
wgt uses Browserify as bundler. In order to build the Component and all the examples you can run:
npm run build_all
Include it in your page:
<body>
...
<script src="https://unpkg.com/wc-grid-table@1.0.3/dist/standalone/bundle.min.js"></script>
</body>
Afterwards the customElement should be registered. You can use the provided defineCustomElement() function, to register the component with the name wc-grid-table or call customElement yourself with a custom name:
WcGridTable.defineCustomElement();
// or
customElements.define('your-fancy-name', TableComponent);
The name has to (or should?!) include atleast one hyphen. After creating a wgt element the only thing needed is to add data:
// any sort of data
let data = [
{
firstname: "Hans",
lastname: "Dieter",
age: 28,
hobby: "running"
},{
firstname: "Karl",
lastname: "Heinrich",
age: 52
},{
firstname: "Manfred",
lastname: "Steibl",
age: 60
}
]
let table = document.createElement('wc-grid-table');
table.setData(data)
document.querySelector('body').append(table);
The following functions are exposed on the wgt element (documented in there respective docstring):
The following properties can be accessed / set directly on wgt element:
condition, styles] where condition is a function (data : Array<Object> , column : string) => Boolean and styles is
an Array of strings with styles, that should apply when condition returns true for a column.
Can be used to style a column in dependency of their data.(value, rowIndex, completeData) => any. Formatter get applied in the sequence they are in the list (leftmost function (2nd from left (3rd ...))).asc, desc]). Sorting is kept after each
sorting operation, so that primary, secondary, tertiary, ... sorting is possible.The following Attributes can be set, to hide some parts of the ui:
More to come.
Copyright 2019 Robert Seidler
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
A table component implemented with css-grid and webcomponents.
The npm package wc-grid-table receives a total of 3 weekly downloads. As such, wc-grid-table popularity was classified as not popular.
We found that wc-grid-table demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.

Security News
GitHub has revoked npm classic tokens for publishing; maintainers must migrate, but OpenJS warns OIDC trusted publishing still has risky gaps for critical projects.