Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

MudTimeline - Can I make MudTimeLineItem clickable?#6008

Unanswered
progMorten asked this question inQ&A
Discussion options

Hi!
I found that the MudTimeLine would be exactly what my client would want to implement for a use case, and that would be a list of "meetings" at different dates. I have started developing but cant seem to find a way to make each item clickable, so one can ie display details of each item when clicking them.

Is this not possible, or am I just not fully understanding the API methods?
Thanks!
Morten

You must be logged in to vote

Replies: 1 comment

Comment options

You can read the currently selectedMudTimelineItem in theclick event handler of the wholeMudTimeline:

<style>    .mud-timeline-item {cursor: pointer; }/* change the mouse cursor to indicate that MudTimelineItems are clickable */</style><MudTimeline@onclick="OnClick"@bind-SelectedIndex="@selectedIndex"TimelinePosition="TimelinePosition.Left"><MudTimelineItem>Meeting 1</MudTimelineItem><MudTimelineItem>Meeting 2</MudTimelineItem><MudTimelineItem>Meeting 3</MudTimelineItem></MudTimeline><br/>Meeting details: @details@code {    int selectedIndex;    string details = "";    void OnClick() {        details = $"Meeting {selectedIndex + 1}";    }}

https://try.mudblazor.com/snippet/GucQlcQrsRyNzcmp

You must be logged in to vote
0 replies
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
2 participants
@progMorten@iwis

[8]ページ先頭

©2009-2025 Movatter.jp