JavaScript Parent node should be closed when child node is open

This is the result:

image1

This is what the page shows when the JSON sets childnode.state.selected For example:

{"children":[],"id":37,"text":"应用显 示","orderid":1,"parent":36,"state":{"disabled":false,"opened":false,"selected":true},"type":2,"url":"application\\list.action"}

When this happens, the parent node will open. I want it closed.

When selected_parent_open is set false it should solve the problem, but I set it and it still doesn't work.

var control = $('#' + treeName)
control.data('jstree', false);//清空数据,必须
                              // empty data
var isCheck = arguments[2] || false; //设置checkbox默认值为false
                                     // set default checkbox value to false 
if(isCheck) {
    //复选框树的初始化
    // initialize checkbox tree
    $.getJSON(url,jsondata, function (data) {
        control.jstree({
            "ui":{selected_parent_open:false},
            'plugins' : [ "checkbox" ], //出现选择框
                                        // selection box
            'checkbox': { cascade: "", three_state: true }, //不级联
                                                            // don't cascade
            'core': {
                'data': data,
                "themes": {
                    "responsive": false
                }
            }
        }).on('loaded.jstree',loadedfunction);
    });
}

What should I do?

What I need is:

image2

Answer:1

I have a container that is a certain width. I have two select elements rendering on the same line in this main div container. The first one is absolute positioned 40px left from the main div ...

I have a container that is a certain width. I have two select elements rendering on the same line in this main div container. The first one is absolute positioned 40px left from the main div ...

Is there any way in which I can spy on the bunyan log to ensure I print out what I expect? MyFile.js const bunyan = require('bunyan'); const log = bunyan.createLogger({name: 'FailureAuditService'}); ...

Is there any way in which I can spy on the bunyan log to ensure I print out what I expect? MyFile.js const bunyan = require('bunyan'); const log = bunyan.createLogger({name: 'FailureAuditService'}); ...

I have heard that JavaScript has a function called search() that can search for a string ( lets call it A ) in another string ( B ) and it will return the first position at which A was found in B. ...

I have heard that JavaScript has a function called search() that can search for a string ( lets call it A ) in another string ( B ) and it will return the first position at which A was found in B. ...

  1. find second occurrence of character in string python
  2. find second occurrence of character in string excel
  3. find second occurrence of character in string sql
  4. find second occurrence of character in string
  5. find second occurrence of character in string c++
  6. find second occurrence of character in string javascript
  7. find second occurrence excel
  8. find second occurrence of character in string r
  9. find second occurrence of character in string regex
  10. find second occurrence of character in excel
  11. find second occurrence of character in string alteryx
  12. find second occurrence of element in list python
  13. find second occurrence of character in string php
  14. find second occurrence of character in string mysql
  15. find second occurrence of character in string oracle
  16. find second occurrence of character in string vb.net
  17. find second occurrence of character in string powershell
  18. find second occurrence of character in string sas
  19. find second occurrence of character in string access
  20. find second occurrence of character in string jquery

I have an an array with key-value pair, array columns are id and name. I want to sort this array by id. The id column value is of type string type but I want to sort them as numeric values. var ...

I have an an array with key-value pair, array columns are id and name. I want to sort this array by id. The id column value is of type string type but I want to sort them as numeric values. var ...

  1. sort array objects javascript
  2. sort array objects alphabetically javascript
  3. sort array objects by property
  4. sort array objects php
  5. sort array objects js
  6. sort array objects by property javascript
  7. sort array objects typescript
  8. sort array objects
  9. sort array objects java
  10. sort array objects swift
  11. sort array objects c#
  12. sort array objects by property js
  13. sort array objects by date
  14. sort array objects by value
  15. sort array objects jquery
  16. sort array objects twig
  17. sort array objects ios
  18. sort objects array ruby
  19. sort array of objects by key javascript
  20. sort array of objects by key value