Hello,
The list seems too long because I have too many elements. How can I add a scroll to it
1 Answer, 1 is accepted
Hello,
This can be done using the popupSettings of the DropDownTree, setting a className to the popup, and then using that to set the required styles.
I made an example showcasing this:
https://stackblitz.com/edit/react-6jtuy3?file=app%2Fmain.jsx
Regards,
Stefan
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.
it gives this error:
Type '{ popupClass: string; }' is not assignable to type 'DropDownsPopupSettings'.
Object literal may only specify known properties, and 'popupClass' does not exist in type 'DropDownsPopupSettings'.
Hello,
This is a strange error as the DropDownsPopupSettings have a field called popupClass that is of type string:
https://www.telerik.com/kendo-react-ui/components/dropdowns/api/DropDownsPopupSettings/#toc-popupclass
You can try to directly cast it to the type:
const popupSettingsValue: DropDownsPopupSettings = {
popupClass: 'test'
}
return (
<DropDownTree
popupSettings={popupSettingsValue}
......
There is no property called popupClass in DropDownsPopupSettings
Kendo react versions in the project
"@progress/kendo-data-query": "^1.5.5",
"@progress/kendo-drawing": "^1.10.1",
"@progress/kendo-licensing": "^1.1.4",
"@progress/kendo-react-animation": "^4.7.0",
"@progress/kendo-react-charts": "^4.7.0",
"@progress/kendo-react-data-tools": "^4.7.0",
"@progress/kendo-react-dateinputs": "^4.7.0",
"@progress/kendo-react-dialogs": "^4.8.0",
"@progress/kendo-react-dropdowns": "^4.7.0",
"@progress/kendo-react-excel-export": "^4.9.0",
"@progress/kendo-react-form": "^4.7.0",
"@progress/kendo-react-grid": "^4.7.0",
"@progress/kendo-react-inputs": "^4.7.0",
"@progress/kendo-react-intl": "^4.7.0",
"@progress/kendo-react-layout": "^4.8.0",
"@progress/kendo-react-pdf": "^4.9.0",
"@progress/kendo-react-progressbars": "^4.8.0",
"@progress/kendo-react-treeview": "^4.7.0",
"@progress/kendo-react-upload": "^4.8.0",
"@progress/kendo-theme-default": "^4.39.0",
Hello,
Could you please try updating the package to the latest version and advise if the issue still occurs. This is how the interface looks in the source code:
export interface DropDownsPopupSettings {
/**
* Controls the popup animation. By default, the open and close animations are enabled.
*/
animate?: boolean | PopupAnimation;
/**
* Specifies a list of CSS classes that will be added to the Popup element.
*/
className?: string | Array<string>;
/**
* Specifies a list of CSS classes that are used for styling the popup inner element.
*/
popupClass?: string;
/**
* Sets the width of the popup container. By default, the width of the host element is used.
*/
width?: string | number;
/**
* Sets the height of the popup container. By default, the height is 200px.
*/
height?: string | number;
/**
* Defines the container to which the Popup will be appended.
* Defaults to [`body`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/body).
*/
appendTo?: HTMLElement;
}
When I updated the package, the popupClass feature came. But a different problem arose. I had to revert to the old version. I'm thinking of writing custom CSS
Hello,
If there is a new issue, please let us know, we will be happy to take a look and fix it.
I will try something for now. I'll let you know if I can't find a solution.
Thank you for helping