镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Link array #110

Open
Open

Description

@tomm1e

Basically I want one main observable array to act as as a "view" for other arrays, in 3.5 I could use:
model.array(model.other_array) this way I can switch between arrays.

But it doesn't work this way in 4.0. In 4.0 if you call it that way, it will add the array function as the first item into the array, as seen here: https://jsfiddle.net/eimmot/nrLy0kuh/21/, and if I try to call it as the function, nothing shows: https://jsfiddle.net/eimmot/nrLy0kuh/20

3.5 link directly:
https://jsfiddle.net/eimmot/nrLy0kuh/8

4.0 w/ valueHasMutated:
https://jsfiddle.net/eimmot/nrLy0kuh/15/

4.0 computed:
https://jsfiddle.net/eimmot/nrLy0kuh/18/

So, computed is another method I could use for switching arrays, but can make things complex if you have more than one of these arrays on a page, much easier to be able to just link the array like in 3.5.

Activity

  1. brianmhunt commented on Apr 28, 2020

    @brianmhunt
    Member

    Thanks for the great report @tomm1e — I'll try to have a look at it in the not-too-distant future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions