Code Monkey home page Code Monkey logo

Comments (7)

ericgio avatar ericgio commented on June 4, 2024

I forgot to add documentation for this prop/feature in the readme. Here's the documentation from the code itself:

For large option sets, initially display a subset of results for improved performance. If users scroll to the end, the last item will be a link to display the next set of results. Value represents the number of results to display. 0 will display all results.

Basically, if you have many (>500) options displayed in the menu, the browser starts to lag because there are so many DOM nodes. By default, the component will truncate to 100 the number of results displayed in the menu. You can change this number to be more or less, with 0 displaying all the options.

from react-bootstrap-typeahead.

arukumar avatar arukumar commented on June 4, 2024

Thanks for replay,
but how to set "initialResultCount" ?. As it shows 100 by default.
And as you mentioned that the last item will be a link to display the next set of results, how we will acheive this ? is there any props

from react-bootstrap-typeahead.

ericgio avatar ericgio commented on June 4, 2024

https://github.com/ericgio/react-bootstrap-typeahead/blob/master/src/Typeahead.react.js#L265

this.props.paginateResults is passed through to initialResultCount. So, set paginateResults to be whatever number you want. If the number of results exceeds the number set by paginateResults (or if you set nothing, if it exceeds 100), the menu will automatically display a menu item to show more results. Note that if the number is not exceeded, the menu item will not be shown.

from react-bootstrap-typeahead.

arukumar avatar arukumar commented on June 4, 2024

thanks ericgio

from react-bootstrap-typeahead.

arukumar avatar arukumar commented on June 4, 2024

Hi ericgio,
i have implemented the same and it works fine, but can we use custom link in place of "Display Next .. result" like "View All".

from react-bootstrap-typeahead.

ericgio avatar ericgio commented on June 4, 2024

Duplicate of #47

This is available in v0.8.0 using the paginationText prop.

from react-bootstrap-typeahead.

arukumar avatar arukumar commented on June 4, 2024

Hi ericgio,
Still i am facing issue.
I have used paginationText="view All" in typeahead tag, but still it display "Display Additional Result".
can we implement click functionality after setting the text in painationText, so that i can navigate to other page?

from react-bootstrap-typeahead.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.