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

@frui.ts/dataviews

Package Overview
Dependencies
Maintainers
5
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@frui.ts/dataviews

View components for data display

  • 1.0.0-alpha.14
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
229
increased by689.66%
Maintainers
5
Weekly downloads
 
Created
Source

@frui.ts/dataViews

View components for data display

DataRepeater - generic structure for rendering data in a grid format. It supports sorting by column and custom value formatters as well.

DataTable - similar to DataRepeater, but renders ordinary html <table> by default.

Example

// in your View
import { ColumnDefinition, DataTable } from "@frui.ts/dataviews";

const tableColumns: ColumnDefinition<MyEntity, MyContext>[] = [
  {
    title: "id",
    property: "id",
    valueFormatter: x => `(${x.value})`
  },
  {
    titleFactory: (context) => {context.localize("name")},
    property: "name",
    sortable: true,
  }
];

...

<DataTable items={vm.items} itemKey="id" columns={tableColumns} context={vm} />

You can check ColumnDefinition for more details.

Styles

You can also use default CSS styles for table column headers supporting sorting:

import "@frui.ts/dataviews/styles/sorting-header.scss";

Keywords

FAQs

Package last updated on 18 Mar 2022

Did you know?

Socket

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.

Install

Related posts

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