Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datatable does not scroll horizontally when there is no data #635

Closed
Yousefjb opened this issue Nov 9, 2018 · 3 comments
Closed

Datatable does not scroll horizontally when there is no data #635

Yousefjb opened this issue Nov 9, 2018 · 3 comments
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@Yousefjb
Copy link
Contributor

Yousefjb commented Nov 9, 2018

When there is no data in Datatable the emptyMessage will appear and it does not scroll which mean the headers does not scroll which leads to columns being truncated

To reproduce edit the sample in https://www.primefaces.org/primereact/#/datatable/scroll and change

componentDidMount() {
        this.carservice.getCarsLarge().then(data => {
            this.setState({
                cars: [],//<--- empty list so emptyMessage appear
                lazyCars: this.loadLazyCars(0),
                lazyTotalRecords: 250000,
                loading: false,
                frozenCars: [
                    {"brand": "BMW", "year": 2013, "color": "Grey", "vin": "fh2uf23"},
                    {"brand": "Chevrolet", "year": 2011, "color": "Black", "vin": "4525g23"}
                ]
            });
        });
    }

I expect emptyMessage to allow me to scroll and see all columns

Thanks

@cakienes
Copy link
Contributor

Having same issue :|

@Yousefjb
Copy link
Contributor Author

For workaround, I've added an empty row which scrolls normally

@cmlonder
Copy link

Any update regarding to this?

@mertsincan mertsincan self-assigned this Mar 11, 2019
@mertsincan mertsincan added the Type: Bug Issue contains a defect related to a specific component. label Mar 11, 2019
@mertsincan mertsincan added this to the 3.1.1 milestone Mar 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

No branches or pull requests

4 participants