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.

checked checkbox dont check with qubit

See original GitHub issue

Hy,

I’ve the following tree in my html5 file:

<ol id="category-tree-6ae0e08870c828c521d570a829f47244" data-name="categories[]"
                                class="bonsai">
                                <li>
                                    <input type="checkbox" name="categories[]" value="6ae0e08870c828c521d570a829f47244"
                                           id="category-checkbox-6ae0e08870c828c521d570a829f47244" checked>

                                    <label for="category-checkbox-6ae0e08870c828c521d570a829f47244">Komfort</label>
                                    <ol>
                                        <li>
                                            <input type="checkbox" name="categories[]"
                                                   value="592641f715f4122453e3c7f8ee39e9ea"
                                                   id="category-checkbox-592641f715f4122453e3c7f8ee39e9ea" checked>

                                            <label for="category-checkbox-592641f715f4122453e3c7f8ee39e9ea">Komfortprodukte</label>
                                            <ol>
                                                <li>

                                                    <input type="checkbox" name="categories[]"
                                                           value="1de9ad690fcd06b744111ac8745af26a"
                                                           id="category-checkbox-1de9ad690fcd06b744111ac8745af26a">

                                                    <label for="category-checkbox-1de9ad690fcd06b744111ac8745af26a">Sonnenblenden</label>
                                                </li>
                                                <li>

                                                    <input type="checkbox" name="categories[]"
                                                           value="baf2b5572a7b023e943f62d9f3ba5820"
                                                           id="category-checkbox-baf2b5572a7b023e943f62d9f3ba5820">

                                                    <label for="category-checkbox-baf2b5572a7b023e943f62d9f3ba5820">Park-Pilot-System</label>
                                                </li>
                                                <li>

                                                    <input type="checkbox" name="categories[]"
                                                           value="a1e347357eded796390b32270b4e0103"
                                                           id="category-checkbox-a1e347357eded796390b32270b4e0103">

                                                    <label for="category-checkbox-a1e347357eded796390b32270b4e0103">Fernbedienung
                                                        f&uuml;r Standheizung</label>
                                                </li>
                                                <li>

                                                    <input type="checkbox" name="categories[]"
                                                           value="81d6f8b94dcea9a7de7e07782d7c7f62"
                                                           id="category-checkbox-81d6f8b94dcea9a7de7e07782d7c7f62">

                                                    <label for="category-checkbox-81d6f8b94dcea9a7de7e07782d7c7f62">Windabweiser</label>
                                                </li>
                                                <li>

                                                    <input type="checkbox" name="categories[]"
                                                           value="76a6d9240e0b9e6851694afa5d604664"
                                                           id="category-checkbox-76a6d9240e0b9e6851694afa5d604664">

                                                    <label for="category-checkbox-76a6d9240e0b9e6851694afa5d604664">Standheizung</label>
                                                </li>
                                                <li>

                                                    <input type="checkbox" name="categories[]"
                                                           value="7648ab8317268b42419111ee35db86df"
                                                           id="category-checkbox-7648ab8317268b42419111ee35db86df">

                                                    <label for="category-checkbox-7648ab8317268b42419111ee35db86df">LED
                                                        Zusatzlicht f&uuml;r Fahrzeuginnenraum</label>
                                                </li>
                                                <li>

                                                    <input type="checkbox" name="categories[]"
                                                           value="71a670233ee019b7e81ce4200fb6bad2"
                                                           id="category-checkbox-71a670233ee019b7e81ce4200fb6bad2">

                                                    <label for="category-checkbox-71a670233ee019b7e81ce4200fb6bad2">R&uuml;ckfahrwarner</label>
                                                </li>
                                                <li>

                                                    <input type="checkbox" name="categories[]"
                                                           value="237a4f7ed538a5dfe52b7b19eab46556"
                                                           id="category-checkbox-237a4f7ed538a5dfe52b7b19eab46556">

                                                    <label for="category-checkbox-237a4f7ed538a5dfe52b7b19eab46556">K&uuml;hlbox</label>
                                                </li>
                                                <li>

                                                    <input type="checkbox" name="categories[]"
                                                           value="1ed4fcc23e426ed064fc6e51cf0ff663"
                                                           id="category-checkbox-1ed4fcc23e426ed064fc6e51cf0ff663">

                                                    <label for="category-checkbox-1ed4fcc23e426ed064fc6e51cf0ff663">Raucher-Paket</label>
                                                </li>
                                                <li>

                                                    <input type="checkbox" name="categories[]"
                                                           value="cf9fdedd0a5489864e4182063fa8715c"
                                                           id="category-checkbox-cf9fdedd0a5489864e4182063fa8715c">

                                                    <label for="category-checkbox-cf9fdedd0a5489864e4182063fa8715c">Wechselrichter</label>
                                                </li>
                                            </ol>
                                        </li>
                                    </ol>
                                </li>
                            </ol>

You can see the checkboxes with value: 6ae0e08870c828c521d570a829f47244 and 592641f715f4122453e3c7f8ee39e9ea are checked. But after your plugin is ready, the checkbox isnt checked in the browser.

bonsai will initialized with this:

$(document).ready(function(){

                        ...

                        $('#category-tree-6ae0e08870c828c521d570a829f47244').bonsai({
                            expandAll: false,
                            checkboxes: true, // depends on jquery.qubit plugin
                        });
...
                                });

Any ideas, why the checkboxes are unchecked after your plugin is running?

kind regards

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
simonexmachinacommented, Aug 10, 2015
var list = $('#my-list');
list.on('change', 'input', function() {
  var checked = list.find('input:checked');
});
0reactions
BroCartcommented, Mar 29, 2020

Sorry, you’re right about the child branch.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to test checkbox checked with React Testing Library?
In this scenario we dont test how many times handleChange called. For this, I create a function with jest.fn, I created a seperate...
Read more >
Different browser behavior when clicking an indeterminate checkbox ...
What I'm seeing is on Chrome/Firefox/Safari when you click a checkbox in that indeterminate state it reacts as if you want to check...
Read more >
3-4) Invent a hypothetical system and procedure to | Chegg.com
To do this, you need an interaction that will change the energy of Bob's qubit dependent on the state of Alice's qubit. Try...
Read more >
Implement - Qubit Docs
For multiple choice type questions, using radio buttons or checkboxes, the value of Responses must be an object containing all checked/selected choices with...
Read more >
Quantum Computers Don't Make Sense. But This ... - WIRED
It stores data in what's called a "qubit," and thanks to the principle of superposition, each qubit can store a 1 and a...
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