#13883: SelectBox.js with grouping (optgroup elements)
-------------------------------------+-------------------------------------
     Reporter:  SardarNL             |                    Owner:  (none)
         Type:  Bug                  |                   Status:  new
    Component:  contrib.admin        |                  Version:  dev
     Severity:  Normal               |               Resolution:
     Keywords:  admin, SelectBox,    |             Triage Stage:  Accepted
  optgroup, sprintdec2010            |
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  1                    |                    UI/UX:  1
-------------------------------------+-------------------------------------

Old description:

> Current implementation ignores optgroup elements in selects. Here is an
> example of SelectBox.js which takes optgroups in account, but uses jQuery
> (already used by django admin anyway).
> The script is not perfectly written. I can rewrite this to meet django's
> coding/quality standards if needed.

New description:



--

Comment (by Narbonne):

 I don't see an update of the filter method. I suppose search should also
 search in the optgroup name (a bit like sort before token search).
 I update your patch line 45 in filter:
 {{{
 const node_text = (node.group && node.group.toLowerCase() || '') +
 node.text.toLowerCase();
 }}}


 Also, maybe it could make sense to move optgroup as a block.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/13883#comment:23>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107017fc19a06a0-da79f698-1385-4dfe-b3bb-3baa233ea942-000000%40eu-central-1.amazonses.com.

Reply via email to