Comments (7)
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.
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.
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.
thanks ericgio
from react-bootstrap-typeahead.
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.
Duplicate of #47
This is available in v0.8.0 using the paginationText
prop.
from react-bootstrap-typeahead.
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)
- Scrolling gets "stuck", bound by keeping the active item in view HOT 1
- Uncaught Error: flushSync was called from inside a lifecycle method. It cannot be called when React is already rendering HOT 3
- Options with a falsey "disabled" property get skipped on keyboard navigation HOT 1
- "Select All" prop HOT 4
- remove defaultProps from ClearButton HOT 1
- 6.3.0 defaults isLoading to true HOT 1
- Package failing in parcel bundler HOT 1
- Using Typeahead as Ref / createRef<Typeahead<any>>() / TS 5.2 / react 18.2.0 HOT 1
- Allow component in `labelKey` HOT 1
- There is no required attribute HOT 1
- Disabled options can be selected by pressing Tab key HOT 2
- Feature Request - Sorting Options Based on Search Query
- Max tokens prop when multiple
- When multiple is set to true to have the possibility of having the menu open when clicking on an option and close on click outside
- Can't access custom MenuItem html HOT 4
- Clear button has small duplicate x (extra span) HOT 1
- When adding this Typeahead component my react application won't load anymore HOT 1
- MenuItem component only displays a subset of suggestions HOT 3
- Typescript types incompatible on examplecode
- Accessible id is not being applied correctly, cannot access element via label text HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-bootstrap-typeahead.