Jinntec / Fore

Fore - declarative user interfaces in plain HTML
MIT License
82 stars 11 forks source link

group not taken into account when resolving inside repeat #140

Closed JoernT closed 1 year ago

JoernT commented 2 years ago

this shows that the group inside of the repeat is not taken into account when resolving nodes.

<html lang="en">
<head>
    <meta charset="utf-8"/>
    <meta content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes" name="viewport"/>

    <title>Epidoc</title>
    <link href="../../resources/css/fore.css" rel="stylesheet"/>
</head>
<body>
<div class="wrapper">
    <fx-fore>
        <fx-model>
            <fx-instance src="HD025278.xml" xpath-default-namespace="http://www.tei-c.org/ns/1.0"/>
        </fx-model>
        <fx-group ref="teiHeader">
            <h1>EDEp Editor</h1>

            <fx-repeat ref=".//msPart">
                <template>
                    <fx-group ref="physDesc/objectDesc/supportDesc/support/dimensions">
                        <!-- 19) -->
                        <fx-control ref="physDesc/objectDesc/supportDesc/support/dimensions/width">
                            <label>Breite</label>
                        </fx-control>
                    </fx-group>
                </template>
            </fx-repeat>

        </fx-group>
    </fx-fore>

</div>
<script type="module" src="./demo.js"/>
</body>
</html>

The above file with data file is present on dev branch named 'resolution.html'.

The control is bound but relative to the repeatitem instead of the group here.

Workaround: