-
Notifications
You must be signed in to change notification settings - Fork 7
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
Tree Item not expanding.. #3
Comments
Hi @planctron, do you have any error message on the Console ? What is the OS and Browser used here ? Yes the code is different from the Tutorial, depending on what step you are. The main branch follow the part 3 of the Tutorial where there is a refactor of the code. The end code is toggleChildren() {
if (this.props.item.child_id.length > 0) {
this.trigger("tree_item_clicked", { data: this.props.item });
}
} In this version, the Controller is listening to the "tree_item_clicked" event, and call the Model. The Model itself will then check if children are undefined to know if it should do an RPC Call or not. If you update your source code to the main branch here, is there still problems ? |
I used the main branch. This toggleChildren() just does not work (for me?). |
Hello @planctron, is this issue with the same setup as the other one, ie OWL 1.2.3 ? Because on OWL 1.2.3 I also cannot get it to work, but it is fixed on any OWL >= 1.2.4. |
Hi. |
@Fritzlseppl Hi, if you are doing something else please give me a link to your repo so i could investigate. |
@PhilDL I unfortunately can not share the whole addon, but most of it is not related to what i mentioned anyways. What i am trying to do is the following: I made a custom purchase module from scratch and the orders within must be confirmed. therefor an email is sent to the person responsible to do this. the emails show up in the chatter section below the order in the form view, but i dont want that. i thought the best way to do that would be to give an option in the message_ids field which defines the chatter. ive got so far as that i can pass the option to the root component below the form_renderer widget, which forms the chatter section. but i struggle to pass the option down to the message_list holding the single messages. if i could access the option there i extended its template and added an t-if, to not show the messages which have message_type "email" if the option is given. so the only thing i needed is how to pass a param through the components or how to access a value of the xml field from an underlying component. maybe i have to use the store for this? |
Having four (demo) categories in my list, but see only "All" tree node which cannot be expanded.
Cause: I could find that the "toggleChildren" looks different than in web tutorial.
toggleChildren() {
if (
this.props.item.child_id.length > 0 &&
this.props.item.children == undefined
) {
this.trigger("tree_item_clicked", { data: this.props.item });
}
Object.assign(this.state, {
childrenVisible: !this.state.childrenVisible,
});
}
}
The text was updated successfully, but these errors were encountered: