Skip to content

Commit 8350f68

Browse files
authored
Wrap EditableSlider label (#373)
* Wrap EditableSlider label * Fix example
1 parent 1214e76 commit 8350f68

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

examples/reference/widgets/TextInput.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,11 @@
114114
"metadata": {},
115115
"outputs": [],
116116
"source": [
117-
"value = pmui.TextInput(label='Value', value='Hello W')\n",
117+
"value_input = pmui.TextInput(label='Value', value='Hello W')\n",
118118
"\n",
119119
"pmui.Column(\n",
120-
" value,\n",
121-
" pmui.Row(pmui.Typography(value.param.value), pmui.Typography(value_input.param.value_input))\n",
120+
" value_input,\n",
121+
" pmui.Row(pmui.Typography(value_input.param.value), pmui.Typography(value_input.param.value_input))\n",
122122
")"
123123
]
124124
},

src/panel_material_ui/widgets/Slider.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ export function render({model}) {
227227
<FormControl disabled={disabled} fullWidth sx={orientation === "vertical" ? {height: "100%", ...sx} : {...sx}}>
228228
{editable ? (
229229
<Box sx={{display: "flex", flexDirection: "row", alignItems: "center", width: "100%"}}>
230-
<FormLabel sx={{whiteSpace: "nowrap"}}>
230+
<FormLabel sx={{whiteSpace: "nowrap", maxWidth: "50%", overflowWrap: "break-word", whiteSpace: "normal"}}>
231231
{label && `${label}: `}
232232
</FormLabel>
233233
<Box sx={{display: "flex", flexDirection: "row", flexGrow: 1}}>

0 commit comments

Comments
 (0)