Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #636 (closed defect: fixed)

Opened 12 years ago

Last modified 10 years ago

[PATCH] AutoCompleteField can't be used an SuggestField

Reported by: Joost Owned by: anonymous
Priority: normal Milestone: 0.9a2
Component: TG Widgets Version:
Severity: normal Keywords: AutoCompleteField, javascript
Cc:

Description

Pressing enter causes the AutoCompleteField widget to automatically select the first result from the results set. This is fine for data entry but for search boxes and such you don't want this automatic behavior. The attached patch adds an extra (optional) attribute: only_suggest which can be set True when one doesn't want the automatic behavior. The patch is backwards compatible.

Usage:

acf = AutoCompleteField(name="search_a", 
                              search_controller="/search",
                              search_param="keywords", 
                              result_name="results",
                              only_suggest=True)

Attachments

patch.patch Download (3.3 KB) - added by Joost 12 years ago.
Makes the automatic selection behaviour optional
636.patch Download (3.1 KB) - added by joost 12 years ago.
updated patch

Change History

Changed 12 years ago by Joost

Makes the automatic selection behaviour optional

comment:1 Changed 12 years ago by michele

This patch doesn't apply any more after r918, can you update it?

Thanks.

Changed 12 years ago by joost

updated patch

comment:2 Changed 12 years ago by kevin

  • Status changed from new to closed
  • Resolution set to fixed
  • Milestone set to 0.9a2

Committed in [1009]. Thanks!

Note: See TracTickets for help on using tickets.