Opened 7 years ago

Closed 4 years ago

#16553 closed enhancement (patchwelcome)

ComboBox: separate highlight logic from queryExpr

Reported by: retrry Owned by:
Priority: undecided Milestone: 1.13
Component: Dijit - Form Version: 1.8.3
Keywords: Cc:
Blocked By: Blocking:

Description

Hello, I'm using dojo with django and tastypie. For tastypie filtering you need to set filtering method in url: name__icontains and so on. But in this case I don't need asteriks from queryExpr (I know that it is used inside for comboBox highlighting).

I set: queryExpr: '*${0}*'

What happens: GET http://localhost:8000/reminders/api/v1/client/?name__icontains=**

What is expected: GET http://localhost:8000/reminders/api/v1/client/?name__icontains=

Maybe we could have 2 different options? queryExpr and highlightExpr?

Attachments (1)

test.html (1.6 KB) - added by retrry 7 years ago.
Attaching full html test case

Download all attachments as: .zip

Change History (6)

Changed 7 years ago by retrry

Attachment: test.html added

Attaching full html test case

comment:1 Changed 7 years ago by bill

Component: GeneralDijit - Form
Owner: set to retrry
Status: newpending
Summary: Do not send asterik from queryExpr to serverComboBox: do not send asterik from queryExpr to server

Apparently you are talking about ComboBox? You didn't list the module or even the package.

If you set queryExpr to *${0}* then it's only natural to expect two asterisks to be sent to the server. Why would you expect something different? I'm guessing what you really want is the last thing you typed, about having a separate highlightExpr, but I'm not sure, please clarify.

comment:2 Changed 7 years ago by retrry

Status: pendingnew

My communication skills fail me - sorry :)

The bug report should have been named: "Separate ComboBox highlight logic from queryExpr" or something in those terms. And that is exactly what I would like to have - separate highlightExpr setting.

comment:3 Changed 7 years ago by bill

Owner: changed from retrry to Douglas Hays
Status: newassigned
Summary: ComboBox: do not send asterik from queryExpr to serverComboBox: separate highlight logic from queryExpr
Type: defectenhancement

OK, seems like you can just override doHighlight() to do what you want, but I suppose a highlightExpr flag would be a bit easier, if it's feasible.

comment:4 Changed 5 years ago by Douglas Hays

Owner: Douglas Hays deleted
Status: assignedopen

comment:5 Changed 4 years ago by dylan

Milestone: tbd1.12
Resolution: patchwelcome
Status: openclosed

Given that no one has shown interest in creating a patch in the past 2+ years, I'm closing this as patchwelcome.

Note: See TracTickets for help on using tickets.