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

Mutliselect dropdown with karat icon similar to dropdown

1 Answer 432 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Manjit
Top achievements
Rank 1
Manjit asked on 05 Apr 2019, 04:10 AM
I have used multi select dropdown in my application, however it looks like a textbox when user looks at it. There is no indication that user needs to click and there will be multi selection list. I'm trying to put karat icon through css which is similar to dropdown but it is not clickable. Kindly help me with it.

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 05 Apr 2019, 06:32 AM
Hello, Manjit,

Currently, this can be achieved using CSS and JavaScript logic on the ComponenDidMount event:

componentDidMount(){
  document.getElementsByClassName('k-multiselect')[0].addEventListener('click',(e)=>{
    if(e.target.className.includes('k-widget') && !document.getElementsByClassName('k-list-scroller')[0]){
      e.target.childNodes[0].click();
    }
  })
}

.k-multiselect:after {
        content: "\25BC";
        position: absolute;
        top: 30%;
        right: 25px;
        font-size: 12px;
    }

This is an example:

https://stackblitz.com/edit/react-yhqoyj-urchyf?file=app/main.js

As I can agree that having an arrow make sense I have created an official feature request for it:

https://feedback.telerik.com/kendo-react-ui/1403828-add-arrow-for-the-multiselect

Regards,
Stefan
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Manjit
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or