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

Extra table rows #30

Closed
hect1c opened this issue Jan 18, 2017 · 2 comments
Closed

Extra table rows #30

hect1c opened this issue Jan 18, 2017 · 2 comments

Comments

@hect1c
Copy link

hect1c commented Jan 18, 2017

Hey,

When I create the table extra rows seem to be created, yet I only have 4 records in my global variable.

` handleAssignedBookings() {
//get bookings
let data,
columns,
options = {};

    data = DATA.bookings.map( function(items) {
        if( items.status != 'pending' ) {
            return items;
        }
    });

    //get columns
    columns = [
        {
            header: 'Name',
            accessor: 'driver.firstName',
        },
        {
            header: 'Pick-up Date/Time',
            accessor: 'pickUp.dateTime',
        },
        {
            header: 'From',
            accessor: 'from.location',
        },
        {
            header: 'To',
            accessor: 'to.location',
        },
        {
            header: 'Status',
            accessor: 'status'
        }
    ];

    //set table config options
    //https://github.com/tannerlinsley/react-table#props
    options = {
        showPageSizeOptions: false,
        showPageJump: false,
        showPagination: false
    }

    return {
        data: data,
        columns: columns,
        options: options
    }
}`

This is one of me methods that I pass to create the table. I've also attached an image localhost

Thanks

@hect1c
Copy link
Author

hect1c commented Jan 18, 2017

It seems I need to explicitly set minRows in my options. Thought there would be a default ?

@tannerlinsley
Copy link
Collaborator

tannerlinsley commented Jan 18, 2017 via email

@hect1c hect1c closed this as completed Jan 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants