Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!

datashield free asked 6 years ago


Hello,

I was wondering if it is pasdfasdossible to change the text on the Switches from On and Off to custom text.

I was also wondering if the element can be updated to show Off on the left side like it is shown in the documentation here


Jakub Mandra staff answered 6 years ago


Hi,

Switch is armed with properties: labelLeft and labelRight which let you smoothly change those labels. We are sorry for the lacks in the documentation -> we have made up it right now after your reports.

Example usage:

<MDBSwitch
  checked={this.state.switchState}
  getValue={this.handleSwitchChange}
  labelLeft="No"
  labelRight="Yes"
/>

Wish you best,

Jakub


Jakub Mandra staff commented 6 years ago

Also we have to update default labels, so the Off will be on the left.



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB React
  • MDB Version: 4.8.4
  • Device: Laptop
  • Browser: Google Chrome 71.0.3578.98
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: Yes