-
-
Notifications
You must be signed in to change notification settings - Fork 531
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
DataGrid: Prefer DatePicker DataGridDateEditColumn and add public API #5719
base: master
Are you sure you want to change the base?
DataGrid: Prefer DatePicker DataGridDateEditColumn and add public API #5719
Conversation
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.
Looking good to me.
What do you think if we add API, like bool NativeMode
, that will keep the DateEdit<>
if enabled?
Then I'd do the same thing for the numeric column. Would you agree? Also altough NativeMode is a clear name for us, it might not be for our users? Do they understand exactly what NativeMode means? Altough I'm not finding a better name. |
Since we are going with new options I think it makes sense to make it for numeric column also.
Maybe |
So I was starting to work on this, but I noticed that there really isn't feature parity. The native one might have different parameters, features... |
We just need to document it and say that in native mode those parameters will be ignored. |
Yeah, that makes it more complicated. If there are overlapping parameters in terms of features then prefer the higher ones. Introduce |
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.
It would be good to have an example in the docs that re-enables native mode.
/// <summary> | ||
/// Gets the date format based on the current <see cref="InputMode"/> settings. | ||
/// </summary> | ||
[Parameter] public string DateDisplayFormat { 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.
Can we reuse the DisplayFormat
from BaseDataGridColumn
? It is the same thing.
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.
Makes sense, although this would have the advantage that you could have a different display format (when viewing the table) and edit format (when editing the records)
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.
In the past this DisplayFormat was used on DateEdit. Back then, DateEdit was using some JS for formating. So it makes sense to make it used on DatePicker today.
{ | ||
@if ( Column.NativeInputMode ) | ||
{ | ||
@dateEditFragment |
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.
Just a small note. Make it uppercase so it matches the naming for numeric component, (NumericEditFragment)
.
No description provided.