npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

anq-server-data-table

v0.0.22

Published

A powerful server-side data table component for Vue 3 applications, built with Quasar Framework. This component provides a seamless way to handle server-side pagination, filtering, sorting, and data management in your Vue applications.

Readme

ANQ Server Data Table

A powerful server-side data table component for Vue 3 applications, built with Quasar Framework. This component provides a seamless way to handle server-side pagination, filtering, sorting, and data management in your Vue applications.

Features

  • Server-side pagination with customizable page sizes
  • Advanced server-side filtering with a modal form
  • Server-side sorting
  • Built-in search functionality
  • Row click events
  • Customizable column definitions
  • Responsive design
  • Built with Vue 3 and Quasar Framework
  • TypeScript support
  • Customizable styling with Tailwind CSS
  • Modal form integration
  • Axios for API requests

Installation

npm install anq-server-data-table

Usage

<template>
  <anq-server-data-table
    :columns="columns"
    :link="apiEndpoint"
    :link-params="additionalParams"
    :title="'My Data Table'"
    :has-search="true"
    :has-filter="true"
    :show-page-size-select="true"
    :enable-row-click="true"
    :filter-modal-data="filterConfig"
    @row-click="handleRowClick"
    @get-data-successfuly="handleDataSuccess"
    @get-data-error="handleDataError"
  />
</template>

<script setup lang="ts">
import { AnqServerDataTable } from 'anq-server-data-table'

const columns = [
  { name: 'id', label: 'ID', field: 'id', sortable: true },
  { name: 'name', label: 'Name', field: 'name', sortable: true },
  // Add more columns as needed
]

const filterConfig = {
  fields: [
    {
      type: 'text',
      label: 'Name',
      urlParam: 'name'
    },
    {
      type: 'select',
      label: 'Status',
      urlParam: 'status',
      choices: [
        { label: 'Active', value: 'active' },
        { label: 'Inactive', value: 'inactive' }
      ]
    },
    {
      type: 'date',
      label: 'Created Date',
      urlParam: 'created_at'
    }
  ]
}

const handleRowClick = (row, index) => {
  console.log('Row clicked:', row, index)
}

const handleDataSuccess = (data) => {
  console.log('Data loaded successfully:', data)
}

const handleDataError = (error) => {
  console.error('Error loading data:', error)
}
</script>

Props

| Prop | Type | Required | Description | |------|------|----------|-------------| | columns | QTableColumn[] | Yes | Array of column definitions | | link | String | Yes | API endpoint URL | | linkParams | Object | No | Additional URL parameters | | title | String | No | Table title | | loading | Boolean | No | Loading state of the table | | hidePagination | Boolean | No | Hide pagination controls | | flat | Boolean | No | Flat style for the table | | square | Boolean | No | Square style for the table | | hasSearch | Boolean | No | Enable search functionality | | hasFilter | Boolean | No | Enable filter functionality | | showPageSizeSelect | Boolean | No | Show page size selector | | enableRowClick | Boolean | No | Enable row click events | | filterModalData | FilterModalData | No | Configuration for filter modal | | axiosInterceptor | AxiosInstance | No | Custom Axios instance | | paginationResponseKeys | Object | No | Custom pagination response keys | | orderingKey | String | No | Custom ordering parameter key | | pageSizes | number[] | No | Available page sizes |

Filter Modal Field Types

The component supports various field types in the filter modal:

  • text: Text input
  • date: Date picker
  • time: Time picker
  • date-time: Date and time picker
  • number: Number input
  • boolean-checkbox: Single checkbox
  • checkboxs: Multiple checkboxes
  • radios: Radio buttons
  • select: Single select dropdown
  • select-multiple: Multiple select dropdown

Events

| Event | Parameters | Description | |-------|------------|-------------| | rowClick | (row: any, index: number) | Emitted when a row is clicked | | getDataSuccessfuly | (data: any) | Emitted when data is successfully loaded | | getDataError | (error: any) | Emitted when data loading fails | | openFilter | () | Emitted when filter modal is opened |

Slots

The component provides several slots for customization:

  • title: Custom table title
  • search-input: Custom search input
  • filter-btn: Custom filter button
  • pagination: Custom pagination controls
  • page-size: Custom page size selector
  • All Quasar QTable slots
  • Filter modal slots (prefixed with filter-modal-)

Dependencies

  • Vue 3
  • Quasar Framework
  • Axios
  • TypeScript
  • Tailwind CSS
  • anq-modal-form

Development

# Install dependencies
npm install

# Start development server
npm run dev

# Build for production
npm run build

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

  • Aymane Nahji

Repository

GitHub Repository