Skip to content

Commit 6d96301

Browse files
authored
Merge pull request #222 from jyeakley/release_2.0
Auto Complete Setter to control displayed suggestions
2 parents 0a65026 + f04940f commit 6d96301

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/main/java/gwt/material/design/addins/client/autocomplete/MaterialAutoComplete.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,18 @@ public void setLimit(int limit) {
508508
}
509509
}
510510

511+
/**
512+
* Set the number of suggestions to be displayed to the user. This differs from
513+
* setLimit() which set both the suggestions displayed AND the limit of values
514+
* allowed within the autocomplete.
515+
* @param limit
516+
*/
517+
public void setAutoSuggestLimit(int limit) {
518+
if (this.box != null) {
519+
this.box.setLimit(limit);
520+
}
521+
}
522+
511523
@Override
512524
public String getPlaceholder() {
513525
return placeholderLabel.getText();

0 commit comments

Comments
 (0)