We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 59e442e + e607fa5 commit 1f4b1deCopy full SHA for 1f4b1de
1 file changed
packages/ra-ui-materialui/src/button/SortButton.tsx
@@ -91,11 +91,16 @@ const SortButton = (props: SortButtonProps) => {
91
setAnchorEl(null);
92
};
93
94
+ const fieldLabel = translateLabel({
95
+ resource,
96
+ source: sort.field,
97
+ });
98
const buttonLabel = translate(label, {
- field: translateLabel({
- resource,
- source: sort.field,
- }),
99
+ field: fieldLabel,
100
+ field_lower_first:
101
+ typeof fieldLabel === 'string'
102
+ ? fieldLabel.charAt(0).toLowerCase() + fieldLabel.slice(1)
103
+ : undefined,
104
order: translate(`ra.sort.${sort.order}`),
105
_: label,
106
});
0 commit comments