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

antd-table-scroll-xaxis-top

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

antd-table-scroll-xaxis-top

scroll table xaxis at top in ant design

  • 1.0.4
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Scroll-antd-table-xaxis-top

Too much table data ?

Need scroll down too much to scroll to see the scrollbar then move to see the right part of table.

Do not worry, laowang can help you 🤘, just try this one.

Work with antd v3 and v4, automatically!

  • scroll-antd-table-xaxis-top

Install

yarn add antd-table-scroll-xaxis-top

Worked with antd 3 / 4, and react > 16.8

Demo

Before

./doc/before.gif

After

./doc/after.gif

Live

Example

import { Table, Card } from 'antd'
import { AntdTableScrollXaxisTop } from 'antd-table-scroll-xaxis-top'
// ... in compoent
  <AntdTableScrollXaxisTop>
    <Table scroll={{ x: 'max-content' }} columns={columns} dataSource={dataSource} pagination={false} />
  </AntdTableScrollXaxisTop>

From CDN

<script src="https://unpkg.com/antd-table-scroll-xaxis-top/dist/index.umd.min.js"></script>

Global var name is AntdTableScrollXaxisTop.

The component is a property. Use it this way.

const { AntdTableScrollXaxisTop } = window.AntdTableScrollXaxisTop

So the import way is always

import { AntdTableScrollXaxisTop } from 'antd-table-scroll-xaxis-top'

Api

proptyperequireddescription
prefixClsstringnosame with antd ConfigProvider prefixCls, unless you have a customized version antd, you should not use it
debugNamestringnoshow some debug info with this for prefix
childrenTableyesantd Table, must one and only one Table child
className and morenoall div acceptable props can be used

General questions

  • Why my table does not has xaxis scroll bar after use this?

    • Set each column with a confirm width, as { title: 'xxx', dataIndex: 'yyy', width: 200 }

    • Set Table prop scroll, as scroll={{ x: 'max-content' }}

Keywords

FAQs

Package last updated on 23 Jun 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