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

Paging allowedPageSizes showing buttons but nothing happening when you press them #164

Closed
greenallparagonuk opened this issue Jun 27, 2017 · 5 comments
Labels
Grid The DevExtreme Reactive Grid component question

Comments

@greenallparagonuk
Copy link

This is issue is probably down to how I'm implementing the grid, but the buttons to alter the amount of rows visible in the pages don't do anything.

I'm using typescript with tsx files, which is from the template I used to create the project from yeoman.

for the render i'm doing:


public render() {
        let contents = this.state.loading
            ? <p><em>Loading...</em></p>
            : this.state.view === "Export"
                ? ParagonAdmin.renderExportsTable(this.state.exportData)
                : this.state.view === "Teams"
                    ? ParagonAdmin.renderTeamTable(this.state.teamData)
                    : this.state.view === "Jobs"
                        ? ParagonAdmin.renderJobsTable(this.state.jobData)
                        : <p>Error</p>;

        return <div>
            <div className="navigation-contextual navigation-main">
                <ul>
                    <li><a className="btn menu-btn" >Teams</a></li>
                    <li><a className="btn menu-btn" >File Extract Log</a></li>
                    <li><a className="btn menu-btn" >Global Address</a></li>
                    <li><a className="btn menu-btn" >Reg Ex Report</a></li>
                </ul>
            </div>
            <h1>Administration</h1>
            {contents}
        </div>;
    }

and the function is:

`private static renderJobsTable(dataJobs: JobsData[]) {
        const pagesizes = [5, 10, 15, 0];
        return <div>
            <Grid rows={dataJobs} columns={[{ name: 'JcId', title: 'Id' }, { name: 'JmCustref1', title: 'Customer Reference' }, { name: 'JcDescription', title: 'Description' }]}>
                <FilteringState defaultFilters={[]} />
                <LocalFiltering />
                <SortingState />
                <LocalSorting />
                <PagingState
                    defaultCurrentPage={0}
                    pageSize={25}
                />
                <LocalPaging />
                <TableView />
                <TableHeaderRow allowSorting />
                <PagingPanel />
                <TableFilterRow />
            </Grid>
        </div>;
    }`
@kvet kvet self-assigned this Jun 27, 2017
@kvet
Copy link
Contributor

kvet commented Jun 27, 2017

Hi,
 
I did not see that you pass a value to the allowedPageSizes property to the PagingPanel plugin.
 
Follow the steps defined in the article about specifying available page sizes: https://devexpress.github.io/devextreme-reactive/react/grid/docs/guides/paging/#page-size-selection

@kvet kvet added the question label Jun 27, 2017
@greenallparagonuk
Copy link
Author

Sorry I was desperately trying to get it to work, looks like I un-did one too many.

It looked like
<PagingPanel allowedPageSizes={pagesizes}/>

I know it works, as it works on the demo! Just don't know what I've done to stop it from working...

@kvet
Copy link
Contributor

kvet commented Jun 27, 2017

I have found that pageSize is not fully configured to work in the controlled mode. See more info about the controlled and uncontrolled modes: https://devexpress.github.io/devextreme-reactive/react/grid/docs/#controlled-and-uncontrolled-modes
 
You can fix the issue by turning pageSize into the uncontrolled mode. Simply change the pageSize property to defaultPageSize.

@kvet
Copy link
Contributor

kvet commented Jul 4, 2017

I'm closing this issue. Feel free to reopen it if you need any further assistance.

@kvet kvet closed this as completed Jul 4, 2017
@dxrobot dxrobot added the Grid The DevExtreme Reactive Grid component label May 2, 2019
@dxrobot dxrobot unassigned kvet May 2, 2019
@lock
Copy link

lock bot commented Jun 15, 2019

This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Grid The DevExtreme Reactive Grid component question
Projects
None yet
Development

No branches or pull requests

3 participants