Skip to content

"SECTIONS" in Oqtane #4187

Answered by sbwalker
kasif asked this question in Q&A
Apr 24, 2024 · 2 comments · 3 replies
Discussion options

You must be logged in to vote

@kasif the existing Section component does not have an OnClick parameter defined which would allow you to execute code in your own component. A parameter would need to be added to the Section component:

    [Parameter]
    public Action OnClick { get; set; } 

and then you could reference it in your declaration

<Section Name="OtherSection" Heading="OTHER" ResourceKey="OtherSection" @ref="otherSection"
          OnClick="@(async () => await YourMethod())">

however I am not sure if/how this would work as the Section component links contain @onclick:preventDefault="true" which was necessary to get the tabs to work in Blazor

            <a data-bs-toggle="collapse" class="app-link-unstyled" …

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@kasif
Comment options

Comment options

You must be logged in to vote
2 replies
@kasif
Comment options

@kasif
Comment options

Answer selected by kasif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants