Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create hierarchical tree of categories and display tree in select box #227

Open
ghost opened this issue Jul 24, 2020 · 3 comments
Open

create hierarchical tree of categories and display tree in select box #227

ghost opened this issue Jul 24, 2020 · 3 comments

Comments

@ghost
Copy link

ghost commented Jul 24, 2020

Hi,

Hope you are all well !

Is it possible to give an example of how to create a hierarchical tree of categories ?

I tried qor-example and it is not showing the parent category in the select box.
It would be really convenient for similar category labels.

Cheers,
X

@raven-chen
Copy link
Member

hi @x0rzkov

"categories" you mean in the select_one or select_many component?

@ghost
Copy link
Author

ghost commented Jul 24, 2020

Hi @raven-chen ,

thanks for the reply !

This piece of code is not working when you are trying to create a tree of category
https://github.com/qor/qor-example/blob/master/models/products/category.go

I tried to re-implement it on a separate qor-admin instance and each time I save a new category with a parent category, it deletes other relationships (for other categories I created).

And from your code, https://github.com/qor/qor-example/blob/master/app/products/products.go#L57, it is select_many component.

Thanks for your next reply, as I need to sort it out quickly either they will kick my ass ^^

@ghost
Copy link

ghost commented Jan 15, 2021

Hi guys, @raven-chen

I think that I understand what he means.

Something like that:
nestedset

Refs:

That would be awesome to add such panel to browse items/products.

Do you think that the qor dev team can do that easily ?

Thanks for any insights or inputs on that

Cheers,
Luc Michalski

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant