question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MultiSelect-Dropdown: number of selected checkbox needs to reset from change in other component

See original GitHub issue

Detailed description

Suppose In Multi-Select dropdown with checkbox, I have selected 2 items. bug-1

And now I want to reset the status flag of 2 selected items on change in the location component like below(This is the end goal): bug-03

But right now, I’m getting like this (Currently this is happening): bug-2

This issue is related to Multi-select Component.

What did you expect to happen? bug-03 What happened instead? bug-2 What would you like to see changed? I believe there should be some props/flag that I can send to multi-select component, based on that component can decide reset or not. Right now I think, on the selection of checkbox, we are pushing the selected object to selectedItems array. I have tried to reset this property on the change of location component, but there is no luck.

What version of the Carbon Design System are you using? "carbon-components-react": "^5.19.1"

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:7

github_iconTop GitHub Comments

2reactions
gdelorycommented, Oct 20, 2018

I already upvoted this, but meanwhile if that an help others, the only ugly way I found to rest the MultiSelect is to programmaticly click the reset button: document.querySelectorAll('.bx--multi-select .bx--list-box__selection--multi').forEach(e => e.click()) add a first class properly to your component to make sure you just reset the one you want to.

0reactions
stale[bot]commented, Jun 11, 2019

As there’s been no activity since this issue was marked as stale, we are auto-closing it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reset jQuery multiselect dropdown with a checkbox
One way is use javascript if jquery is not properly working to deslect the value. function clearSelected(){ var elements = document.
Read more >
Multi-select Dropdown List with Checkbox using jQuery
This plugin is the easiest way to change the interface of native select box elements and create multi select box with the checkbox....
Read more >
Bootstrap Multiselect - free examples, templates & tutorial
Responsive Multiselect built with Bootstrap 5. Examples of multiselect dropdown with checkbox, listbox, search, buttons, groups, icons, validation, ...
Read more >
ng-multiselect-dropdown
Limit the selection of number of items from the dropdown list. Once the limit is reached, all unselected items gets disabled. none.
Read more >
checked - CSS: Cascading Style Sheets - MDN Web Docs
The :checked CSS pseudo-class selector represents any radio ( ), checkbox ( ), or option ( in a ) element that is checked...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found