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.

renderSelectedChoices doesn't working with groups

See original GitHub issue

Hey,

I am trying to use the group option with renderSelectedChoices set to always, and it’s not working.

 choicesGroup = [ {
    label: 'Group one',
    id: 1,
    choices: [
      {value: 'Child One', label: 'Child One'},
      {value: 'Child Two', label: 'Child Two'},
    ]
  },
    {
      label: 'Group two',
      id: 2,
      choices: [
        {value: 'Child Four', label: 'Child Four'}
      ]
    } ];

this.choices.setChoices(choicesGroup, this.valueKey, this.labelKey, true);

When I select an item, it disappears from the list. I can confirm it is working with the following example:

const choices = [
  {value: 'One', label: 'Label One'},
  {value: 'Two', label: 'Label Two'},
  {value: 'Three', label: 'Label Three'},
];
this.choices.setChoices(choices, this.valueKey, this.labelKey, true);

It seems there is a bug when using groups or I am missing something? Thanks.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
maximmigcommented, Sep 18, 2017

I confirm this bug. I’ll create a PR to fix it as soon as my current PR gets accepted or rejected. Thanks!

0reactions
jshjohnsoncommented, Nov 7, 2018

I believe this has now been resolved 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Options doesn't re-render when updating a grouped options
Hi, updating the grouped options doesn't re-render the options but works fine for non-grouped options. It only gets re-rendered after the ...
Read more >
asp.net - @if not rendering form options on change of other ...
If a certain value is selected I want more form options to appear below using @if. However when running if the select option...
Read more >
Selection mode bug / not optimum - D5 RENDER FORUM
Hello D5 team. I find the select tool not very eficient. On large scene the double click to go from “group select” to"single...
Read more >
Render Options in Studio One - YouTube
PreSonus Software Specialist Gregor Beyerle teaches you everything you need to know about Studio One's render options.
Read more >
React conditional rendering: 9 methods with examples
In React, conditional rendering refers to the process of delivering elements and components based on certain conditions.
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