Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Objects do not consider correct incapsulation. Bug #649

Open
Abi1ity opened this issue Sep 8, 2017 · 2 comments
Open

Objects do not consider correct incapsulation. Bug #649

Abi1ity opened this issue Sep 8, 2017 · 2 comments

Comments

@Abi1ity
Copy link

Abi1ity commented Sep 8, 2017

Let we have an object. It contains a lot of data, including three fields. Let it also contain a list of the objects with the same fields.

{
    externalId
    externalList : 
    [
        0 : {externalId: "7a2256334f", externalName: "SuperName1", externalType: "goodType"}
        1 : {externalId: "54541fcd15", externalName: "SuperName2", externalType: "goodType"}
    ]
    externalName
    externalType
}

Then you try to make a select of that list:

<select class="select2 base-select" id="externalNames_select" name="externalNameList">
    {{#externalList}}
        <option value="{{externalId}}">{{externalName}}</option>
    {{/externalList}}
</select>

You consider renderind externalId and externalName from the list, but the Mustache is "lazy" and renders externalId and externalName from the root level and you need something non-obvious to spesify it.

I guess it is possible to realize it with partials or functions, but in-box behavior should not be that one.

@CodeSmith32
Copy link

Same issue here. +1
For now I can get away with using a different child name.

@jstortz
Copy link

jstortz commented Dec 5, 2019

Same issue here. +1
Surprised this si still an issue...how are people getting around this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@jstortz @Abi1ity @CodeSmith32 and others