How to know if the composer being used for editing topic,creating topic or replying a topic


(Net Deamon) #1

In the model properties for composer plugin outlet “composer-fields-below”,

I could not find the property of model object which says whether the composer is being used for creating a topic, or editing a topic or being replied to topic?


(Joe Buhlig) #2

I’m not sure I follow where you’re looking at the model, but the model for the composer component has an action attribute. That’s what you’re looking for.


(Net Deamon) #3

When I try to inspect the ember component, I find the action to be null.

In the above screenshot, I inspected the properties for the editor composer. The action is null.

I surely might be doing something wrong, or looking in wrong component. Can you please tell me which component did u inspect?

Why do I need to know if the composer is for create topic or replying?
Because I want to add a custom field in composer, which will be used only when creating topic, not for replying…


(Net Deamon) #4

Thanks Joe,
I was able to find the action in

component.model.action