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 7582575
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T18:28:07+00:00 2026-05-30T18:28:07+00:00

I have an observable array that holds a list of people and a table

  • 0

I have an observable array that holds a list of people and a table that displays their first name, with a select button for each. When the user clicks the select button I’d like another element on screen to display the person’s full name. Is there a way to get it so that if a person is removed from the array, it also removes the element displaying their full name?

jsFiddle example here

Edit: I can achieve this by putting self.SelectedPerson(false); in the remove function, but is there a better way of doing it?

2nd Edit: Changed the jsFiddle

  • 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-30T18:28:08+00:00Added an answer on May 30, 2026 at 6:28 pm

    One useful thing here is that in the click method in a foreach loop you get the current data item sent to the function, which means that you can set the SelectedAccount observable to the item sent to the function.

    Check this updated jsFiddle: http://jsfiddle.net/jCkuY/1/

    And for the remove function you can either set the selectedAccount to an empty Account object or even to null, but then you’ll need to use an if binding perhaps.

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

Sidebar

Related Questions

I have a Knockout.JS observable array that is the basis for a list: self.list_elements
I have a Knockout observable array that I wish to edit from within Javascript
I am populating a secondary table with an observable array that is a child
i have a an observable array in my model that is bind to just
I have an observable array with var items= [ {image: /images/image1.jpg }, {image: /images/image2.jpg
I am new to Knockout.js, I have created an observable array and initialized with
I have a an array of observable collections and I want to display all
I have an observable collection of objects that I'd like to display on the
I have company list, when clicking on each company need to show the salespersons
Hi (another Knockout question :-( , sorry) I have an observable array with five

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.