Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Twitter bootstrap 固定数据表宽度不小于';t调整容器_Twitter Bootstrap_Reactjs_Fixed Data Table_Storybook - Fatal编程技术网

Twitter bootstrap 固定数据表宽度不小于';t调整容器

Twitter bootstrap 固定数据表宽度不小于';t调整容器,twitter-bootstrap,reactjs,fixed-data-table,storybook,Twitter Bootstrap,Reactjs,Fixed Data Table,Storybook,我有一个简单的固定数据表组件,基于 我把它写在故事书上 import React, { Component } from 'react'; var FixedDataTable = require('fixed-data-table'); const {Table, Column, Cell} = FixedDataTable; export default class IndexPage extends Component{ render() { retu

我有一个简单的固定数据表组件,基于 我把它写在故事书上

import React, { Component } from 'react';
var FixedDataTable = require('fixed-data-table');
const {Table, Column, Cell} = FixedDataTable;

export default class IndexPage extends Component{
    render() {      
        return (
            <div className='container'>             
                <div className='row'>
                    <div className='col-md-2'></div>
                    <div className='col-md-8'>
                        <Table
                            rowHeight={50}
                            headerHeight={50}
                            rowsCount={3}
                            width={1000}
                            height={500}
                            {...this.props}>
                            <Column
                              header={<Cell>Col 1</Cell>}
                              cell={<Cell>Column 1 static content</Cell>}
                              width={200}
                              flexGrow={1}
                              fixed={true}
                            />
                            <Column
                              header={<Cell>Col 2</Cell>}
                              cell={<Cell>Column 2 static content</Cell>}
                              width={200}
                              flexGrow={1}
                            />
                            <Column
                              header={<Cell>Col 3</Cell>}
                              cell={<Cell>Column 3 static content</Cell>}
                              width={200}
                              flexGrow={1}
                            />
                        </Table>
                    </div>    
                    <div className='col-md-2'></div>
                </div>
            </div>  
        );  
    }
}
import React,{Component}来自'React';
var FixedDataTable=require('fixed-data-table');
const{Table,Column,Cell}=FixedDataTable;
导出默认类IndexPage扩展组件{
render(){
返回(
);  
}
}
问题是:
表的水平滚动不显示,并且表超出了容器的边界。

您需要在中间div中添加溢出规则,以便在子项(表)增长超过百分比宽度时进行处理。尝试添加:
overflow-x:scroll到中间部分。

很抱歉耽搁了很长时间。它部分地解决了这个问题——但我发现这个示例使用了额外的库——它们以某种方式测量了包装器的div!