react-bootstrap-typeahead-tabindex
Version:
React-based typeahead using the Bootstrap theme
17 lines (14 loc) • 373 B
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
/**
* Truncates the result set based on `maxResults` and returns the new set.
*/
function getTruncatedOptions(options, maxResults) {
if (!maxResults || maxResults >= options.length) {
return options;
}
return options.slice(0, maxResults);
}
exports.default = getTruncatedOptions;
;