vigour-io / brisky-struct

An observable data structure
5 stars 1 forks source link

shallow + references does not work as expected #245

Closed jimdebeer closed 7 years ago

youzi commented 7 years ago
{
  "focus": {
    "val": "shallow"
  },
  "style": {
    "focusBorder": {
      "val": "shallow"
    }
  }
}

does not fire when updating focus (toggles between 'active' / true / false )

jimdebeer commented 7 years ago

can you add the datastructure? (references or something)

Sent from my iPhone

On 29 Mar 2017, at 11:32, Youri Daamen notifications@github.com wrote:

{ "focus": { "val": "shallow" }, "style": { "focusBorder": { "val": "shallow" } } } does not fire when updating focus (toggles between 'active' / true / false )

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

youzi commented 7 years ago

This is the (simplified) data (its a menu). It has refs but the subscribed fields are living on the actual item.

"{
  "items": {
    "0": {
      "active": true,
      "focus": false,
      "style": {
        "activeBackground": "#000a21",
        "focusBorder": "#00c4dd"
      },
      "order": 0,
      "val": [
        "@",
        "root",
        "page",
        "YYCLGm9A8CsUUgy4YI2y8"
      ]
    },
    "1": {
      "active": false,
      "focus": false,
      "style": {
        "activeBackground": "#000a21",
        "focusBorder": "#00c4dd"
      },
      "order": 1,
      "val": [
        "@",
        "root",
        "page",
        "2WmoP3ABQkucqSQ0IIySSE"
      ]
    },
    "2": {
      "active": false,
      "focus": false,
      "style": {
        "activeBackground": "#000a21",
        "focusBorder": "#00c4dd"
      },
      "order": 2,
      "val": [
        "@",
        "root",
        "page",
        "3f7BYg1N5Yyam2eis4cKwi"
      ]
    }
  }
}"