Skip to content

Size Per Page Drop Down not working #710

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

Closed
rich-ware opened this issue Sep 15, 2016 · 3 comments
Closed

Size Per Page Drop Down not working #710

rich-ware opened this issue Sep 15, 2016 · 3 comments

Comments

@rich-ware
Copy link

rich-ware commented Sep 15, 2016

Hi, I am having the same issue for the sizePerPageList. When I inspect the dropdown element on the page, it has my values of the sizePerPageList array.

const options = {
        //page: 1,  // which page you want to show as default
        sizePerPageList: [ {
          text: '5', value: 5
        }, {
          text: '10', value: 10
        }, {
          text: 'All', value: this.props.owners.length
        } ], 
        paginationShowsTotal: false, 
        hideSizePerPage: false 
      };

<BootstrapTable
              data={ this.props.owners }
              pagination={ true }
              options={ options }>
              <TableHeaderColumn dataField='_id' isKey={ true } hidden={ true }>Owner ID</TableHeaderColumn>
              <TableHeaderColumn dataField='first_name'>First Name</TableHeaderColumn>
              <TableHeaderColumn dataField='last_name'>Last Name</TableHeaderColumn>
            </BootstrapTable>

Does anyone have a solution for this issue?

Thanks!

@AllenFang
Copy link
Owner

HI @rich-ware, duplicated with #539, You should remember to add bootstrap.js. BTW, in the v3.0.0, we've plan to remove the bootstrap.js dependency. so currently, you should add it :)
Thanks

@mvamax
Copy link

mvamax commented Dec 5, 2016

Hi if we use create-react-app what is the good way to include this in our project in order to resolve this issue?

i tried :

  • npm install jquery --save and npm install bootstrap --save with no success.
  • different ways with import but with no results.

I agree adding

<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>

resovled the issue but in a react project i would make my import with npm.

Any suggestions?

Thank you

@AllenFang
Copy link
Owner

@mvamax, you can try v3.0.0-beta.2, but it still unstable, check #497. Anyway, I'm not sure the root cause, cause I haven't see any error message, in practice, it should work after you add bootstrap.js and jquery.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants