This is a migrated thread and some comments may be shown as answers.

minimumButton and maximumButton props for Window are weird (?)

1 Answer 56 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Grant
Top achievements
Rank 3
Iron
Iron
Veteran
Grant asked on 26 Jan 2021, 04:49 PM

Hi Team, 

How do I use the min/max button props for windows? Im trying to hide the buttons without success, I've tried these values with the following results:
true/false - failed
"true"/"false" - works, but theres a warning in the browser console. (If it doesnt appear at first, refresh the page)
blank string - failed
the letter 's' - works, no errors (this was an accident, some letters work, some dont. I didnt try them all)

StackBlitz Demo

Thanks,
Grant

1 Answer, 1 is accepted

Sort by
0
Accepted
Stefan
Telerik team
answered on 27 Jan 2021, 06:13 AM

Hello, Grant,

The type of these props is `React.ComponentType<any><any>`:

https://www.telerik.com/kendo-react-ui/components/dialogs/api/WindowProps/#toc-maximizebutton

This means that they are expecting a React component (class or function).

If we have to hide them, we can return null:

maximizeButton={()=> null}
https://stackblitz.com/edit/react-u5inxb?file=src%2FApp.js
The idea of these props is to allow the developer to customize them or remove them similarity to how all other components have render functions to customize a part of the component.

Regards,
Stefan
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
General Discussions
Asked by
Grant
Top achievements
Rank 3
Iron
Iron
Veteran
Answers by
Stefan
Telerik team
Share this question
or