-
Notifications
You must be signed in to change notification settings - Fork 79
docs: add chat initial docs #11678 #3193
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
Conversation
Add the Chat to the "INTERACTIVITY AND UX" category on the home page. |
TextField="Content" | ||
AuthorIdField="UserId" | ||
TimestampField="SentAt" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use @nameof()
}; | ||
|
||
Messages.Add(newMessage); | ||
await InvokeAsync(StateHasChanged); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this really necessary? The component updates even without it.
SentAt = DateTime.Now.AddMinutes(-3) | ||
} | ||
}; | ||
private string CurrentUserId = "user1"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private string CurrentUserId = "user1"; | |
private readonly string CurrentUserId = "user1"; |
|
||
public class ChatMessage | ||
{ | ||
public string Id { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public string Id { get; set; } | |
public string Id { get; set; } = string.Empty; |
public class ChatMessage | ||
{ | ||
public string Id { get; set; } | ||
public string Content { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public string Content { get; set; } | |
public string Content { get; set; } = string.Empty; |
{ | ||
public string Id { get; set; } | ||
public string Content { get; set; } | ||
public string UserId { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public string UserId { get; set; } | |
public string UserId { get; set; } = string.Empty; |
public string Content { get; set; } | ||
public string UserId { get; set; } | ||
public DateTime SentAt { get; set; } | ||
public List<FileSelectFileInfo> Attachments { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public List<FileSelectFileInfo> Attachments { get; set; } | |
public List<FileSelectFileInfo>? Attachments { get; set; } |
components/chat/data-binding.md
Outdated
public class ChatMessage | ||
{ | ||
public string Id { get; set; } | ||
|
||
public string AuthorId { get; set; } | ||
|
||
public string AuthorName { get; set; } | ||
|
||
public string Content { get; set; } | ||
|
||
public DateTime Timestamp { get; set; } | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public class ChatMessage | |
{ | |
public string Id { get; set; } | |
public string AuthorId { get; set; } | |
public string AuthorName { get; set; } | |
public string Content { get; set; } | |
public DateTime Timestamp { get; set; } | |
} | |
public class ChatMessage | |
{ | |
public string Id { get; set; } = string.Empty; | |
public string AuthorId { get; set; } = string.Empty; | |
public string AuthorName { get; set; } = string.Empty; | |
public string Content { get; set; } = string.Empty; | |
public DateTime Timestamp { get; set; } | |
} |
Closes https://github.com/telerik/blazor/issues/11678