# Value Converter update problems with arrays

**URL:** <https://discourse.aurelia.io/t/value-converter-update-problems-with-arrays/1250>\
**Category:** Help Requests\
**Created:** [May 26, 2018, 5:16pm UTC](https://discourse.aurelia.io/t/value-converter-update-problems-with-arrays/1250 "2018-05-26T17:16:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![typedef](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/typedef/32/388_2.png) [@typedef](https://discourse.aurelia.io/u/typedef)\
**Post date:** [May 26, 2018, 5:16pm UTC](https://discourse.aurelia.io/t/value-converter-update-problems-with-arrays/1250/1 "2018-05-26T17:16:08Z")

</div>

Hi,

I have a repeat.for loop on an array of object, and I filter this array with anotherArray in a custom value converter.  
When the otherArray changes, my view is not refreshed. I tried to use **signalBindings** to explicitly trigger the refresh of the view but it does not seem to work that way.  
Am I expecting things that are not supposed to work? Is there another way to do this?

Here the gist to reproduce my problem : [https://gist.run/?id=31f739c99c7347853089226c9e2ff980](https://gist.run/?id=31f739c99c7347853089226c9e2ff980)

Thank you,  
Cheers,

---

<div class="post-metadata">

**Author:** ![avrahamcool](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/avrahamcool/32/368_2.png) [@avrahamcool](https://discourse.aurelia.io/u/avrahamcool)\
**Post date:** [May 27, 2018, 8:43am UTC](https://discourse.aurelia.io/t/value-converter-update-problems-with-arrays/1250/2 "2018-05-27T08:43:21Z")

</div>

the problem is that your array is not changing, (items are being added to it - but the array reference doesn’t change).  
I don’t know why the custom signal is not working.  
and I’m pretty sure this code use to work (I’m not sure in what version of what package).  
I’ve recently also had breaking changes in my app regarding changes in array that are not reflected properly, and I came up with a easy fix.  
in your binding, add the `length` of the array as a parameter, that way - when the length changes - the binding will reevaluate.

```
<template>
  <div repeat.for="item of array | customArrayFilter:otherArray:otherArray.length">
    <span>${item.id} : ${item.value}</span>
  </div>
</template>
```

---

<div class="post-metadata">

**Author:** ![typedef](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/typedef/32/388_2.png) [@typedef](https://discourse.aurelia.io/u/typedef)\
**Post date:** [May 27, 2018, 9:53pm UTC](https://discourse.aurelia.io/t/value-converter-update-problems-with-arrays/1250/3 "2018-05-27T21:53:20Z")

</div>

It seems that the declaration of the `signals` inside the value-converter doesn’t work like I did it, or has not to be done like this anymore?  
I fixed it using the signal binding behavior directly in my view like :

```auto
<template>
 <div repeat.for="item of array | customArrayFilter:otherArray & signal:'custom-signal-changed'">
  <span>${item.id} : ${item.value}</span>
  </div>
 </template>

```

---

<div class="post-metadata">

**Author:** ![bigopon](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/bigopon/32/18_2.png) [@bigopon](https://discourse.aurelia.io/u/bigopon)\
**Post date:** [May 28, 2018, 3:40am UTC](https://discourse.aurelia.io/t/value-converter-update-problems-with-arrays/1250/4 "2018-05-28T03:40:54Z")

</div>

In your example, you were not assigning value to `signals`, but declaring type for it

change to `signals = ['custom-..']`

Probably you were using typescript, and did the same thing ?
