Nested child component in ToolBar

0 Answers 130 Views
ToolBar
Danny
Top achievements
Rank 1
Danny asked on 31 Jul 2023, 05:02 PM
I want to create a component that will contain kendo-toolbar-button. I will use this component within <kendo-toolbar> . When I try to implement it this way the buttons don't appear.

<kendo-toolbar>
 <toolbar-button>
 </toolbar-button>
</kendo-toolbar>

Toobar-button:
    <kendo-toolbar-button [imageUrl]="'assets/delete.png'" [fillMode]="'flat'">
    </kendo-toolbar-button>

It does work when I directly add kendo-toolbar-button to kendo-toolbar. However I would prefer the one above
Georgi
Telerik team
commented on 03 Aug 2023, 01:03 PM

Hello Danny, 

Thank you very much for the code snippets provided.

In order to use the kendo-toolbar-button, the button would need to be placed directly in the Toolbar component as when it is placed outside the Toolbar, it would be an unknown element when the HTML is read. For further reference about using the built-in tools and controls of the Toolbar, please check out the following article: 

https://www.telerik.com/kendo-angular-ui/components/toolbar/control-types/

More details about the implementation of custom tools in the Toolbar could be found in the following article: 

https://www.telerik.com/kendo-angular-ui/components/toolbar/custom-control-types/#toc-adding-custom-tools-to-the-toolbar

I hope this answers your question. Please, let me know if I am missing out on something. 

Regards,
Georgi
Progress Telerik
Danny
Top achievements
Rank 1
commented on 03 Aug 2023, 05:07 PM

Thank you Georgi. I am assuming that means you can't add a textbox into the Toolbar component since it's not listed in the control types
Yanmario
Telerik team
commented on 08 Aug 2023, 04:36 AM

Hi Danny,

You can add a TextBox component inside the ToolBar as discussed in the following thread:

https://www.telerik.com/forums/how-to-add-textbox-into-toolbar

Regards,
Yanmario
Progress Telerik     

No answers yet. Maybe you can help?

Tags
ToolBar
Asked by
Danny
Top achievements
Rank 1
Share this question
or