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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T19:38:56+00:00 2026-06-11T19:38:56+00:00

So I have a collection that I loop through to display some data. There’s

  • 0

So I have a collection that I loop through to display some data. There’s a remove button next to each row to remove a given row’s $data from the observableArray collection. It removes it fine, but here’s the problem. Some of the input fields on each row have a custom binding that I created to do some validation. As the user is interacting with the form, the update event of the custom binding gets fired as it should. But when the user removes a row, the update event does NOT fire!

This completely messes up the state of my validation. Does anyone know what’s going on here?

Here’s a jsfiddle for this issue.

Update: Also, in situations where the update event does get called in result of a change, the order in which the events get called are problematic. If I remove an element, the update event gets called first due to some update to an observable at which point the element itself is still in the DOM. So I have no way of knowing inside the update event whether or not the element that is being updated still exists in the DOM or not!

  • 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-06-11T19:38:57+00:00Added an answer on June 11, 2026 at 7:38 pm

    In your example the binding is only on the obervable item not on the array. Add your binding to the observableArray – append to the foreach binding in your example

    <div data-bind="foreach: firstNames, validators:true">
        <input type="text" data-bind="value: firstname, validators:true" />
        <span data-bind="text: firstname"></span>
        <input type="button" value="remove" data-bind="click: $root.deleteRow" /><br />
    </div>
    

    greetings @all

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

Sidebar

Related Questions

I have two functions that loop through all models in a Backbone collection, and
I have a collection of objects that I would like to iterate through to
I have a collection of div's which I need to remember and loop through,
I loop through the documents of my collection, do some stuff, and then update
I have a ruby method that performs a complex data collection and places the
I have a bunch of string data and I can loop through it one
I have a collection that use as a cache. How can I limit the
I have a collection that contains all the items that I want to keep
I have a collection that is binded to my Listview. I have provided options
If I wanted to have a collection that described the (recursive) contents of a

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.