Results 1 to 9 of 9

Thread: Tree checked

  1. #1
    Sencha Premium Member
    Join Date
    Feb 2010
    Posts
    86
    Vote Rating
    1
      0  

    Default Answered: Tree checked

    Trying to add a check box next to a node. To do this in ExtJS we just need to include "checked: true" in the data. Not getting the same results doing that in ExtReact. None of the examples happen to be checkbox trees (interesting). Below is the fiddle code.

    Code:
    import React, {Component} from 'react';
    import {launch} from '@extjs/reactor';
    import {Tree} from '@extjs/ext-react';
    
    class App extends Component {
        store = Ext.create('Ext.data.TreeStore', {
            rootVisible: true,
            root: {
                expanded: true,
                text: 'All',
                children: [{
                    text: 'Messages',
                    leaf: true,
                    checked: true
                }]
            }
        })
        render() {
            return ( < Tree store = {this.store} shadow / >)
        }
    }
    launch( < App / > );

  2. Modern implementation of the tree isn't the same as classic is feature-wise (yet). You can add a CheckColumn to your grid, but it won't be entirely the same.

  3. #2
    Sencha - Sustaining Engineer tristan.lee's Avatar
    Join Date
    Mar 2015
    Location
    Central Ohio
    Posts
    1,577
    Answers
    165
    Vote Rating
    81
      0  

    Default

    Modern implementation of the tree isn't the same as classic is feature-wise (yet). You can add a CheckColumn to your grid, but it won't be entirely the same.
    Tristan Lee
    Sencha Inc - Sustaining Engineer


    Having an issue? Help us help you - be detailed; provide some code; demonstrate with a fiddle (fiddle.sencha.com)

    Embed your fiddle in your post: [FIDDLE]id[/FIDDLE]

  4. #3
    Sencha Premium Member
    Join Date
    Feb 2010
    Posts
    86
    Vote Rating
    1
      0  

    Default

    Thanks Tristan. As we have been trying this out we suspected ExtReact is using the Modern ExtJS but were hopeful since the documentation had the checked parameter and getChecked() method.

  5. #4
    Sencha - Sustaining Engineer tristan.lee's Avatar
    Join Date
    Mar 2015
    Location
    Central Ohio
    Posts
    1,577
    Answers
    165
    Vote Rating
    81
      0  

    Default

    On which component did you see these methods?
    Tristan Lee
    Sencha Inc - Sustaining Engineer


    Having an issue? Help us help you - be detailed; provide some code; demonstrate with a fiddle (fiddle.sencha.com)

    Embed your fiddle in your post: [FIDDLE]id[/FIDDLE]

  6. #5
    Sencha Premium Member
    Join Date
    Feb 2010
    Posts
    86
    Vote Rating
    1
      0  

  7. #6
    Sencha - Sustaining Engineer tristan.lee's Avatar
    Join Date
    Mar 2015
    Location
    Central Ohio
    Posts
    1,577
    Answers
    165
    Vote Rating
    81
      0  

    Default

    Yes, it will exist on the NodeInterface because that is a data package class that is shared between the 2 toolkits. However, the modern Ext.grid.Tree component doesn't have implementation for records with a checked property like the classic toolkit.
    Tristan Lee
    Sencha Inc - Sustaining Engineer


    Having an issue? Help us help you - be detailed; provide some code; demonstrate with a fiddle (fiddle.sencha.com)

    Embed your fiddle in your post: [FIDDLE]id[/FIDDLE]

  8. #7
    Sencha Premium Member
    Join Date
    Feb 2010
    Posts
    86
    Vote Rating
    1
      0  

    Default

    Playing around a bit we did not see an alternate way to mimic the check functionality of selecting nodes with the Tree. Are we missing something?

  9. #8
    Sencha - Sustaining Engineer tristan.lee's Avatar
    Join Date
    Mar 2015
    Location
    Central Ohio
    Posts
    1,577
    Answers
    165
    Vote Rating
    81
      0  

    Default



    It doesn't have the parent/child relationship like the model does in classic. Checkboxes are in the column and not next to each node.
    Tristan Lee
    Sencha Inc - Sustaining Engineer


    Having an issue? Help us help you - be detailed; provide some code; demonstrate with a fiddle (fiddle.sencha.com)

    Embed your fiddle in your post: [FIDDLE]id[/FIDDLE]

  10. #9
    Sencha Premium Member
    Join Date
    Feb 2010
    Posts
    86
    Vote Rating
    1
      0  

    Default

    Thank you, Tristan. That will work. Our tree is not very deep. Kick-us-in-the-head, we tried that but obviously we did something wrong.

Similar Threads

  1. Replies: 2
    Last Post: 12 Nov 2014, 11:35 AM
  2. Checkbox Tree Child nodes not checked When parent checked
    By mgarn in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 6 Jan 2012, 8:33 AM
  3. Problem (maybe a bug) in checked Tree
    By rjjan in forum Ext GWT: Help & Discussion (1.x)
    Replies: 2
    Last Post: 20 Nov 2008, 6:20 AM
  4. A Checked XMLTreeLoader tree?
    By bschuhma in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 20 Aug 2008, 7:32 AM
  5. Checked tree and listeners ?
    By hakaneri in forum Ext GWT: Help & Discussion (1.x)
    Replies: 1
    Last Post: 14 Aug 2008, 1:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •