JavaScript RactiveJS and Stapes model not updating

I am trying to create a filtering for a Stapes object in RactiveJS, but it seem the two way binding is not responding correctly to the update.

I can't work out what is going wrong where as I thought it should just work without any issue, I have created a code example here:

https://jsbin.com/sajeje/4/edit?html,output

Answer:1

Here's the pattern I use for using a computed property with a filter adapted for your use case. I couldn't get the Stapes object to directly be usable as the result, but there is a getAllAsArray() that seems to work:

  computed: {
    filtered: function () {
       var query = this.get( 'query').trim(),
           users = this.get( 'users' );

      return query ? users.search(query) : users.getAllAsArray();
    }
  },

  data: function () {
    return {
      users: usersModel,
      query: ''
    }
  }

Works with the sub-component as pure reactive programming without the need for an event:

<Search query="{{query}}" placeholder="Search users" />

Updated bin here: https://jsbin.com/bomumajagu/edit?html,output

Push works against Stapes model:

this.get( 'users' ).push( { name: newUser } );
Answer:2

I have a test.txt file that has two columns of data (x's and y's), eg: #test.txt 1 23 2 234 4 52 43 5 3 35 And a python program that reads in these values and stores them in x and y as so: #test.py ...

I have a test.txt file that has two columns of data (x's and y's), eg: #test.txt 1 23 2 234 4 52 43 5 3 35 And a python program that reads in these values and stores them in x and y as so: #test.py ...

  1. transfer array from php to javascript
  2. transfer array in java

I'm currently working on something that requires me to put the value of an input field as an object item. var test = { item1:{ subitem1: "", <------- This is the one I'm trying to fill ...

I'm currently working on something that requires me to put the value of an input field as an object item. var test = { item1:{ subitem1: "", <------- This is the one I'm trying to fill ...

I have a situation where I need to add a class to a table, but only if the table is inside a div with id 'mydiv' AND there is a row in table containing an <a href=...> element where the href ...

I have a situation where I need to add a class to a table, but only if the table is inside a div with id 'mydiv' AND there is a row in table containing an <a href=...> element where the href ...

I want to exetend Tab component with es6 class like this: import React from "react"; import {Tab} from "material-ui"; class MyTab extends Tab { constructor(props){ super(props); } ...

I want to exetend Tab component with es6 class like this: import React from "react"; import {Tab} from "material-ui"; class MyTab extends Tab { constructor(props){ super(props); } ...

  1. extend material component
  2. angular extend material component
  3. material ui extend component
  4. extends angular material components