@@ -93,28 +93,25 @@ const CollectionList = ({
9393 return null ;
9494 } ;
9595
96- const getButtonLabel = useMemo (
97- ( fieldName , displayName ) => {
98- const { field, direction } = sorting ;
99- let buttonLabel ;
100- if ( field !== fieldName ) {
101- buttonLabel =
102- field === 'name'
103- ? t ( 'CollectionList.ButtonLabelAscendingARIA' , { displayName } )
104- : t ( 'CollectionList.ButtonLabelDescendingARIA' , { displayName } ) ;
105- } else if ( direction === SortingActions . DIRECTION . ASC ) {
106- buttonLabel = t ( 'CollectionList.ButtonLabelDescendingARIA' , {
107- displayName
108- } ) ;
109- } else {
110- buttonLabel = t ( 'CollectionList.ButtonLabelAscendingARIA' , {
111- displayName
112- } ) ;
113- }
114- return buttonLabel ;
115- } ,
116- [ sorting , t ]
117- ) ;
96+ const getButtonLabel = ( fieldName , displayName ) => {
97+ const { field, direction } = sorting ;
98+ let buttonLabel ;
99+ if ( field !== fieldName ) {
100+ buttonLabel =
101+ field === 'name'
102+ ? t ( 'CollectionList.ButtonLabelAscendingARIA' , { displayName } )
103+ : t ( 'CollectionList.ButtonLabelDescendingARIA' , { displayName } ) ;
104+ } else if ( direction === SortingActions . DIRECTION . ASC ) {
105+ buttonLabel = t ( 'CollectionList.ButtonLabelDescendingARIA' , {
106+ displayName
107+ } ) ;
108+ } else {
109+ buttonLabel = t ( 'CollectionList.ButtonLabelAscendingARIA' , {
110+ displayName
111+ } ) ;
112+ }
113+ return buttonLabel ;
114+ } ;
118115
119116 const renderFieldHeader = ( fieldName , displayName ) => {
120117 const { field, direction } = sorting ;
0 commit comments