Coder Social home page Coder Social logo

antd-resize-table's Introduction

import { ResizeTable } from "antd-resize-table";
const columns = [
    {
        width: 100; //  100 | '100' | '15%'  该值为渲染的最小宽度 实际可能大于该数值  默认为100  当该值为百分比时,会被计算为当前表格实际宽度*百分比
        key: 'key1', //同antd 必传
        dataIndex: "key1", //同antd 必传
        title: 'key1', //同antd
        allowDrag: true, //是否允许拖拽 默认为true  注意该列的拖动按钮在title的左侧
        maxDragableWidth: 200 //  100 | '100' | '15%' //最大可拖拽宽度
        minDragableWidth: 100 //  100 | '100' | '15%' //最小可拖拽宽度
    }
]

<ResizeTable
    defaultMinDragWidth={100}
    enableWidthAsDefaultDragWidht={true}
    dataSource={[{key1:'key1'}]}
    columns={columns}
    autoExpand={true}
/>

// defaultMinDragWidth: 50 // number 默认为 50 最小可拖拽宽度 // enableWidthAsDefaultDragWidth : boolean 默认为 false 将最小可拖拽宽度设置与 width 一致 优先级大于 defaultMinDragWidth 小于 minDragableWidth 其他 Api 使用和 antd Table 完全一致 // autoExpand 默认为false 当列宽之和大于table实际宽度时时候允许滚动,初始总列宽大于实际宽度时值为true

antd-resize-table's People

Contributors

knaewang avatar kanewang99 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.