Socket
Socket
Sign inDemoInstall

@mconnect/mc-data-table

Package Overview
Dependencies
22
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @mconnect/mc-data-table

mConnect DataTable UI Component


Version published
Maintainers
1
Created

Changelog

Source

Version 0.1.1

  • Release date: Oct 12, 2023
  • Updated README documentation-v0.1.1

Readme

Source

@mconnect/mc-data-table | mConnect DataTable UI Component (vue-UI component)

  • Smart, Simple & Versatile UI datatable, built using vue3 composition API

  • Include paging of batch records and query skip-limit to load records from backend API server / service providers

  • Adjustable paging size

  • Easy search to view records by search keywords

  • Clear message showing the records view by query records and search keywords

  • Development & Documentation In progress

Installation

npm install @mconnect/mc-data-table

// import (include) the mc-data-table stylesheet in your application
import "@mconnect/mc-data-table/dist/style.css"

Components and Features

  • screen short
  • McDataTable: entry point for defining the table options, structure and contents
  • McExplorerDataTable: McDataTable subcomponent for McExplorer component (see McExplorer for details)
  • McPageLimit: select the records to display per page [10, 20, 30, 50, 100, 200]
  • McPageNav: page navigation features - first, last, previous, next and subset of intermediary pages
  • McTable: The table structure (column / headers) and contents
  • McTableMessage: indicate the current table records information, by page navigation and records total
  • McTableNoData: a component to display when there are no records to display
  • McTableSearch: used to filter table contents/records, by search keyword(s)

Usage Specifications

  • You may import McDataTable, McExplorerDataTable & McTableNoData as components into your UI view/page
import {McDataTable, McTableNoData} from "@mconnect/mc-data-table";
import type {DataField, DataFetchAlertResult} from "@mconnect/mc-data-table"

  • activate the mcDatatable component in your UI template, and provide the required and/or optional props

<template>
  <McDataTable v-if="dataItems.length > 0" data-fields="" data-items="" data-stats="" data-fetch-alert=""/>

</template>

<script setup lang="ts">
  import {McDataTable, McTableNoData} from "@mconnect/mc-data-table";
  import type {DataField, DataFetchAlertResult, ObjectType} from "@mconnect/mc-data-table"
  
  import {ref} from "vue"
  // McDataTable props
  const dataItems = Array<ObjectType>([])

  // McExplorerDataTable props, in addition to McDataTable
  


  // McTableNoData props
  
  

</script>

  • usage example
  • Required and optional specifications
  • McDataTable: props (required and optional)
  • Required props: dataFields (Array) and dataItems (Array)
  • Optional props: dataTotal, paging, pageStart, pageLimits (Array), tableStyle, sortStyle
  • dataFields: => dataSpecs.ts
  • dataItems: => provider data records props : { dataFields: { type : Array, required: true, }, dataItems : { type : Array, required: true }, dataTotal : { type : Number, default: 0, }, paging : { type : Boolean, default: true, }, pageStart : { type : Number, default: 1, }, pageLimits: { type : Array, default: () => [10, 20, 30, 50, 100, 200], }, tableStyle: { type : Object, default: () => { return { table : "w3-table w3-striped w3-border w3-bordered w3-hoverable", tableHeader: "w3-red", tableBody : "w3-hover", } }, }, sortStyle : { type : Object, default: () => { return { asc : "fa fa-caret-up", desc: "fa fa-caret-down", } }, }, },

Keywords

FAQs

Last updated on 12 Oct 2023

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc