From c7e467303753acd008309d08fb673be2424adc91 Mon Sep 17 00:00:00 2001 From: navedqb <109583873+navedqb@users.noreply.github.com> Date: Tue, 19 Nov 2024 17:57:07 +0530 Subject: [PATCH] correct empty label rendering in togglebutton (#7433) --- components/lib/togglebutton/ToggleButton.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/lib/togglebutton/ToggleButton.js b/components/lib/togglebutton/ToggleButton.js index 08cdc487ca..0f9e92b891 100644 --- a/components/lib/togglebutton/ToggleButton.js +++ b/components/lib/togglebutton/ToggleButton.js @@ -21,7 +21,7 @@ export const ToggleButton = React.memo( const hasLabel = props.onLabel && props.onLabel.length > 0 && props.offLabel && props.offLabel.length > 0; const hasIcon = props.onIcon && props.offIcon; - const label = hasLabel ? (props.checked ? props.onLabel : props.offLabel) : ' '; + const label = hasLabel ? (props.checked ? props.onLabel : props.offLabel) : '\u00A0'; const icon = props.checked ? props.onIcon : props.offIcon; const toggle = (e) => {