DropDownTree Height Problem

1 Answer 70 Views
DropDownList TreeList TreeView
Fırat
Top achievements
Rank 1
Fırat asked on 07 Dec 2021, 03:33 PM

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

Sort by
0
Stefan
Telerik team
answered on 08 Dec 2021, 06:42 AM

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.

Fırat
Top achievements
Rank 1
commented on 08 Dec 2021, 10:18 AM

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'.

 

Stefan
Telerik team
commented on 08 Dec 2021, 02:39 PM

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}
        ......

Fırat
Top achievements
Rank 1
commented on 09 Dec 2021, 06:05 AM | edited

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",
Stefan
Telerik team
commented on 09 Dec 2021, 06:11 AM

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;
}
This was added around 2 months ago, so the version could be the reason. 

Fırat
Top achievements
Rank 1
commented on 09 Dec 2021, 07:39 AM

Thanks Stefan,
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
Stefan
Telerik team
commented on 09 Dec 2021, 07:49 AM

Hello, 

If there is a new issue, please let us know, we will be happy to take a look and fix it.

Fırat
Top achievements
Rank 1
commented on 09 Dec 2021, 10:19 AM

I will try something for now. I'll let you know if I can't find a solution.

Thank you for helping

Tags
DropDownList TreeList TreeView
Asked by
Fırat
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or