-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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] Add specific label for linkOperator #3915
Changes from 3 commits
41a43f8
f26df2b
29f0e0f
6bfdaa2
7c3c65d
09ada06
e4c09f7
2ce5b45
384d1c4
fe22fff
34dfaac
010cbdc
25ee5fc
5208849
17b6ad5
697e562
6ede64a
4d5c8cc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -41,6 +41,7 @@ export const GRID_DEFAULT_LOCALE_TEXT: GridLocaleText = { | |||||
// Filter panel text | ||||||
filterPanelAddFilter: 'Add filter', | ||||||
filterPanelDeleteIconLabel: 'Delete', | ||||||
filterPanelLinkOperator: '', | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need to add a label. Keeping it empty violates https://www.w3.org/TR/using-aria/#fifthrule The correct name would be "logic operator" but it's too long. A benchmark might be necessary. For me, "operator" is perfect and "operators" (referring to those like "contains") should be changed to "rule" or "condition". But if we change then we lose sync with the translation constant. Anyway, the API uses some confusing names for the filter model: #1722 (comment) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removing the label may not be ideal, there's no demo without it. We could experiment with the ToggleButton. It doesn't require a visible label. There's also a demo using a Menu. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think ToggleButton is a good option. We already have a lot of information on the page. Showing both "And" and "Or" options will add confusion. The demo is using a combination of The current solution add If your point is that selects accessibility does not contain demo without label, I think the topic of this section is mostly how to add a label on Select component There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In such a case it would be nice to have a way to add a label, but I do not see how to make that easy to find for developers. What do you think about wanting to see if some users require to display the label? |
||||||
filterPanelOperators: 'Operators', | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know why it's in plural but it refers to the current value. The same for "Columns".
Suggested change
|
||||||
filterPanelOperatorAnd: 'And', | ||||||
filterPanelOperatorOr: 'Or', | ||||||
|
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 it possible to make all fields in the filter panel
outlined
?I was playing with it a bit and wasn't able to make value input outlined.
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.
Not easily, because the value input component can be any thing developer wants.
By default, we set
variant="standard"
in GridFilterInputValuehttps://github.com/alexfauquette/material-ui-x/blob/refacto-export-button/packages/grid/_modules_/grid/components/panel/filterPanel/GridFilterInputValue.tsx#L128:L128
To customize them, developers can edit operators. To make them outlined thy should add to the default operators
InputComponentProps: {variant: "outlined"}