0

I have a an address array that is mapped using knockout mapping. Is there anyway to automatically set my "MODIFIED" field to "1" when any other field in the same address block is modified, without individually subscribing to each observable member?

example - http://jsfiddle.net/bookamp/8Wc5J/11/

"ADDR_L1": "XYZ",
"ADDR_L2": "ABC",
"ADDR_L3": "",
"SMONTH": "12",
"SDAY": "02",
"EMONTH": "06",
"EDAY": "22",
"MODIFIED" : false

This is first child model in my child model array. If ADDR_L1 is modified, I want to update MODIFIED to "1". Is this possible without having to subscribe to each observable member? Also is it possible to rest the modified flag is the changes are reverted.

Thanks in advance.

Bookamp
  • 672
  • 8
  • 19

1 Answers1

0

For anyone interested, this is how I did it -

http://jsfiddle.net/bookamp/8Wc5J/12/

with help from - Link and Link

Community
  • 1
  • 1
Bookamp
  • 672
  • 8
  • 19