Text color

How to return the text color when clicking the next text?Screenshot (478).png


1 Reply

SK Satheesh Kumar Balasubramanian Syncfusion Team December 23, 2021 10:13 AM UTC

Hi Belle, 
  
Thanks for using Syncfusion Products. 
  
We have prepared sample to return the text color when clicking the next text using the below customization. 
  
  
index.html: 
    <style> 
      body { 
        touch-action: none; 
      } 
      .e-toolbar .e-toolbar-items .e-toolbar-item.e-select .e-tbar-btn-text { 
        color: red; 
      } 
    </style> 
  
index.ts: 
function clickHandler(args: ClickEventArgs): void { 
  let target = document.querySelector( 
    '.e-toolbar .e-toolbar-items .e-toolbar-item.e-select' 
  ); 
  if (target) { 
    for (let i = 0; i < toolbarObj.items.length; i++) { 
      if (toolbarObj.items[i].id == target.firstElementChild.id) { 
        toolbarObj.items[i].cssClass = ''; 
      } 
    } 
  } 
  if (args.item.id === '2019') { 
    args.item.cssClass = 'e-select'; 
  } else if (args.item.id === '2020') { 
    args.item.cssClass = 'e-select'; 
  } else if (args.item.id === '2021') { 
    args.item.cssClass = 'e-select'; 
  } else if (args.item.id === '2022') { 
    args.item.cssClass = 'e-select'; 
  } 
} 
  
Kindly try the above sample and let us know if this meets your requirement. 
  
Regards, 
Satheesh Kumar B 


Loader.
Up arrow icon