question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Search for subnodes in accordion admin isn't possible

See original GitHub issue

Search for subnodes in accordion admin isn’t possible, because the parent nodes are collapsed and can not be opened.

Model: class Element(TreeNodeModel): TYPES = Choices('Namespace', 'Class', 'Object') name = models.CharField(max_length=255, blank=False, null=False, unique=True) model_type = models.CharField( choices=TYPES, default=TYPES.Object, max_length=100) treenode_display_field = 'name'

Admin: @admin.register(models.Element) class ElementAdmin(TreeNodeModelAdmin): # admin.ModelAdmin treenode_accordion = True autocomplete_fields = ['tn_parent'] list_display = ('id', 'model_type', ) search_fields = ['name', 'tn_parent__name'] exclude = ('tn_priority', ) form = TreeNodeForm

No search: grafik

Search for child node: grafik

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
alexbredocommented, Mar 22, 2019

Top, you’re the best 👍

0reactions
fabiocaccamocommented, Mar 25, 2019

@alexbredo you can install 0.13.0 version. ModelAdmin options are changed, treenode_accordion option has been replaced by treenode_display_mode since a new 'breadcrumbs' display mode can be used:

# treenode_display_mode = TreeNodeModelAdmin.TREENODE_DISPLAY_MODE_ACCORDION
# treenode_display_mode = TreeNodeModelAdmin.TREENODE_DISPLAY_MODE_BREADCRUMBS
treenode_display_mode = TreeNodeModelAdmin.TREENODE_DISPLAY_MODE_INDENTATION

When there is an active list_filter o any query string, the display mode will default to TreeNodeModelAdmin.TREENODE_DISPLAY_MODE_BREADCRUMBS to preserve data visualization integrity.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Re-editing a page loses all existing accordions - Drupal
First time trying the module out and thanks for sharing it. Edited a node. Added accordions via the button that showed in the...
Read more >
Fetching menu items and its sub-items to accordion using ...
iam trying to fetch menu items and its sub items from mysql database to an accordion using react and axios. i could fetch...
Read more >
Bootstrap Accordion - examples & tutorial
Responsive accordion built with the latest Bootstrap 5. Accordion is a vertically collapsing element to show and hide content via class changes.
Read more >
How to use an accordion into another accordion ? (or tabs or ...
I'm trying to put an accordion into another, and the lonely way I found is to not use the same widget into another....
Read more >
Accordion | Components | Vaadin Docs
Accordion is a vertically stacked set of expandable panels. ... Set the theme attribute separately for each panel, not on Accordion itself.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found