1.0.9 • Published 4 months ago

antd-mobile-table v1.0.9

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

AntdMobileTable

This component is a wrapper over the classic antd table with full support for all antd table features. If the mobileBreakPoint (props value) is less than the specified value then rendereds a different HTML code for better responsiveness of the user interface.

Installation

npm i antd-mobile-table

Usage

import * as React from 'react';
import { Button } from 'antd';
import { AntdMobileTable } from 'antd-mobile-table';

const columns = [
  {
    title: 'Name',
    dataIndex: 'name',
    key: 'name',
  },
  {
    title: 'Age',
    dataIndex: 'age',
    key: 'age',
  },
  {
    title: 'Actions',
    dataIndex: 'address',
    key: 'address',
    render: () => {
      <Button>Edit</Button>;
    },
  },
];

const dataSource = [
  {
    id: '1',
    name: 'Alex',
    age: 20,
  },
  {
    id: '2',
    name: 'Paul',
    age: 28,
  },
];

export default function App() {
  return (
    <div>
      <h1>AntdMobileTable</h1>
      <AntdMobileTable
        mobileBreakPoint={768}
        columns={columns}
        dataSource={dataSource}
      />
    </div>
  );
}

Demo

Alt text

Live demo

https://stackblitz.com/edit/stackblitz-starters-efgdjy?file=src%2FApp.tsx

1.0.9

4 months ago

1.0.8

8 months ago

1.0.7

8 months ago

1.0.6

8 months ago

1.0.5

8 months ago

1.0.4

8 months ago

1.0.3

8 months ago

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago