Skip to content

Passing templates into markup control messes up the @js directive #941

Description

@tomasherceg

Yesterday, @exyi found an edge case where this won't work:

<cc:CustomControl>
  <MyTemplate>

    <!-- this should reference the @js directive of the page, not the markup control -->
    <dot:Button Click="{staticCommand: _js.Invoke(...)}" />

    <!-- this should export the named command in the module of the page, not the markup control -->
    <dot:NamedCommand Name="something" Command="{...}" />

  </MyTemplate>
</cc:CustomControl>

We are not sure how to fix this right now, and we decided to solve it after DotVVM 3.0.
A similar issue probably occurs in nested markup controls and with-control-properties binding - we should find a way how to do it reliably and implement it for both situations.

Originally posted by @tomasherceg in #935 (comment)

Activity

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

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions