KendoReact DropDownButton Auto-Close Prevention

2 posts, 1 answers
  1. Andrew
    Andrew avatar
    1 posts
    Member since:
    Apr 2020

    Posted 28 May 2020 Link to this post

    Hello,

    I currently am working on a project where we need a dropdownbutton that displays a checklist list where multiple items can be selected/checked before the list closes.

    I know that several other Kendo React components have an auto-close flag or similar feature, but so far I have been unable to prevent the DropDownButton component from auto-closing whenever one of the items in the dropdown is selected.

    Is there some way (either some existing parameter or known workaround) to prevent the close event from happening "onItemClick" for the DropDownButton as I only want it to happen "onBlur"?

  2. Answer
    Stefan
    Admin
    Stefan avatar
    3034 posts

    Posted 29 May 2020 Link to this post

    Hello, Andrew,

    Currently, this can be done by using the custom rendering and stoping the on click event propagation:

    https://stackblitz.com/edit/react-recfdf?file=app/main.jsx

    Please have in mind that this will stop the onItemClick event as well, but as we are using custom renders, we can execute the same logic on the onClick that we use to prevent the propagation.

    Regards,
    Stefan
    Progress Telerik

    Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
    Our thoughts here at Progress are with those affected by the outbreak.
Back to Top