Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7005997
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:25:18+00:00 2026-05-27T21:25:18+00:00

i’m trying to create the same thing as shown in the sproutcore doc http://docs.sproutcore.com/

  • 0

i’m trying to create the same thing as shown in the sproutcore doc
http://docs.sproutcore.com/

the searchfield on the left side and its dynamically changing content below.
i have set up the SC.ListView with its contentBinding and my fixtures are all shown.

how can i connect the input from a SC.TextFieldView with the content of my SC.ListView?
can someone provide an helpful link or maybe point in the right direction?

thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T21:25:19+00:00Added an answer on May 27, 2026 at 9:25 pm

    So your list view content is driven by an ArrayController. You can extend that controller and create an App.FilteringArrayController. I think the SCUI framework has some sort of filtering controller already.

    App.FilteringArrayController = SC.ArrayController.extend({
    
        searchValue: null, // bind the value of your text field to here.
    
        searchValueDidChange: function(){
            this.invokeOnce(this._filterContent); // every time the value changes, filter the content
        }.observes('searchValue'),
    
        _filterContent: function(){
           var searchVal       = this.get('searchValue'),
               content         = this.get('content'), 
               filteredContent = [];
    
           // loop over content here, comparing searchVal to some property of the objects
           //  in content.  For every match, add the object to filteredContent
    
           // finally, set the new content. 
           // any collection views bound to this controller's arrangedObjects property will update
           this.set('content', filteredContent);
    
        }
    
    });
    

    For small to medium sized lists this will work.

    EDIT — based on you clarification in comments things are different.

    Keeping a million objects on the client is not a good idea. The browser will use a ridiculous amount of memory.

    So you should change the above code, when the value changes, you should initiate a call to the server. The server should do the search for you. When it returns the results (which should be limited to say 100 records) you would update the content on the controller, and the GUI would update automatically.

    Needless to say, with lots of data you are going to need a highly optimized implementation on the server. You are going to have to modify your UI elements to be inactive for the search.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, what I'm trying to create is a page of div tags, each has
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm trying to create an if statement in PHP that prevents a single post
I am trying to understand how to use SyndicationItem to display feed which is
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I am trying to loop through a bunch of documents I have to put
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm new to using the Perl treebuilder module for HTML parsing and can't figure

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.