Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

120
Views
ExtJS - showing preloaded value of treepanel's store

I'm using ExtJS 6.2. I have a xtype: 'treepanel' that allows an admin user type to check several companies. If user_type = company, then the treepanel is preloaded with that company's node checked value as true, and also I set 'beforecheckchange' listener to return false, so that user cannot select any other company.

What I would like to achieve now is to focus the store on to that preloaded value. In other words, I don't want the user to scroll to find its company's node checked, I would like to preset that position to show the checked node right away.

Any orientation on how to achieve this would be appretiated.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Achieved using treepanel's selectPath method, in afterlayout event:

afterlayout: function(me){
                  var type = localStorage.getItem("Usertype");
                  var id = localStorage.getItem("Id");
                  var tree = Ext.getCmp('your_treepanel_id')
                  if(type==desiredUserFilter) {
                        var child = me.getRootNode().findChild('id',id,true)
                        tree.selectPath(child)
                  }
              },
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!