streamlit-nightly 1.46.1.dev20250624__py3-none-any.whl → 1.46.2.dev20250626__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- streamlit/elements/arrow.py +5 -5
- streamlit/elements/code.py +6 -4
- streamlit/elements/dialog_decorator.py +18 -1
- streamlit/elements/lib/column_types.py +7 -0
- streamlit/elements/metric.py +20 -2
- streamlit/elements/widgets/multiselect.py +27 -1
- streamlit/static/index.html +1 -1
- streamlit/static/manifest.json +218 -218
- streamlit/static/static/js/{ErrorOutline.esm.DcGodXA0.js → ErrorOutline.esm.CJg-nD07.js} +1 -1
- streamlit/static/static/js/{FileDownload.esm.BtTSWyv0.js → FileDownload.esm.Bqu9hYVK.js} +1 -1
- streamlit/static/static/js/{FileHelper.BOV_ijyF.js → FileHelper.BTD8--nH.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.YYlwo10a.js → FormClearHelper.DwQzHDKa.js} +1 -1
- streamlit/static/static/js/{Hooks.BoB69I0K.js → Hooks.CkgvOw3a.js} +1 -1
- streamlit/static/static/js/{InputInstructions.B5C3dEon.js → InputInstructions.A_59uy0m.js} +1 -1
- streamlit/static/static/js/{ProgressBar.2T39z4H_.js → ProgressBar.B8wHlmHP.js} +2 -2
- streamlit/static/static/js/{RenderInPortalIfExists.Dr06opo0.js → RenderInPortalIfExists.DLkeeRK1.js} +1 -1
- streamlit/static/static/js/{Toolbar.BRouzc5U.js → Toolbar.CTXCF-zE.js} +1 -1
- streamlit/static/static/js/{base-input.PyN4CoyX.js → base-input.DLahFrJX.js} +4 -4
- streamlit/static/static/js/{checkbox.CpyGalPT.js → checkbox.BqH30Pie.js} +2 -2
- streamlit/static/static/js/{createSuper.Jon9k3Yt.js → createSuper.BR6dNcL_.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.D4ghymBb.js → data-grid-overlay-editor.DHD2lEOv.js} +1 -1
- streamlit/static/static/js/{downloader.FX1msyAN.js → downloader.Cxz7Pmav.js} +1 -1
- streamlit/static/static/js/{es6.QGDMdnvM.js → es6.CKIqaUkI.js} +2 -2
- streamlit/static/static/js/{iframeResizer.contentWindow.t8qLRzyv.js → iframeResizer.contentWindow.BUR39Ca8.js} +1 -1
- streamlit/static/static/js/index.086fJkRW.js +1 -0
- streamlit/static/static/js/index.0RieWGP-.js +1 -0
- streamlit/static/static/js/index.39cFhVAB.js +1 -0
- streamlit/static/static/js/{index.CwKcK2uB.js → index.5T0ZQUll.js} +1 -1
- streamlit/static/static/js/{index.PsjpMKwq.js → index.5WfC2MKX.js} +2 -2
- streamlit/static/static/js/{index.C4qeNI_i.js → index.B5TjHKHs.js} +1 -1
- streamlit/static/static/js/{index.CZttj0Fd.js → index.BBk99Mab.js} +1 -1
- streamlit/static/static/js/{index.DgNa_UKX.js → index.BEVVZtmO.js} +61 -61
- streamlit/static/static/js/{index.GgMflWG-.js → index.BJg-lqwR.js} +1 -1
- streamlit/static/static/js/{index.B-vIEt1m.js → index.BnPGYwJD.js} +1 -1
- streamlit/static/static/js/{index.B2Y8O1Wt.js → index.Br9KoWfK.js} +1 -1
- streamlit/static/static/js/{index.Dieu6abC.js → index.BvMYFCGi.js} +1 -1
- streamlit/static/static/js/{index.B7osuoZN.js → index.BydvTht8.js} +2 -2
- streamlit/static/static/js/{index.CuLeR7Zz.js → index.C0sFxtmT.js} +1 -1
- streamlit/static/static/js/{index.BJhXUMZ4.js → index.C46vZAVk.js} +1 -1
- streamlit/static/static/js/{index.BG2gdqVa.js → index.C8wAT-1P.js} +1 -1
- streamlit/static/static/js/{index.BTUUpB01.js → index.CF_0T827.js} +1 -1
- streamlit/static/static/js/index.CJNu66g-.js +1 -0
- streamlit/static/static/js/{index.B5UnBp6n.js → index.Ched5ljK.js} +1 -1
- streamlit/static/static/js/{index.BXxgCK9y.js → index.Cp5DQ0Nk.js} +1 -1
- streamlit/static/static/js/{index.CUBt4-Uz.js → index.Cx9oo677.js} +2 -2
- streamlit/static/static/js/{index.kEHB5PaN.js → index.CxswEeN7.js} +1 -1
- streamlit/static/static/js/{index.IZ-swmmu.js → index.D5Bi0_IY.js} +1 -1
- streamlit/static/static/js/{index.B_pohBxx.js → index.DFLLK5fQ.js} +1 -1
- streamlit/static/static/js/{index.COUW2Eq4.js → index.DaVYWs29.js} +3 -3
- streamlit/static/static/js/{index.cLUrTr09.js → index.DbeUpiV0.js} +1 -1
- streamlit/static/static/js/{index.D4M62uXW.js → index.DlQzdr4z.js} +1 -1
- streamlit/static/static/js/{index.ArgFGqRm.js → index.DoCkeB4S.js} +1 -1
- streamlit/static/static/js/index.Dpi_eA9w.js +1 -0
- streamlit/static/static/js/{index.Bzp1Qysi.js → index.Dt6vo5Wt.js} +1 -1
- streamlit/static/static/js/{index.C-vLCSJp.js → index.Du_GhChx.js} +61 -62
- streamlit/static/static/js/{index.CdJwjLfQ.js → index.NIVZIka1.js} +2 -2
- streamlit/static/static/js/{index.DdfoIDPC.js → index.YJxN7uL8.js} +1 -1
- streamlit/static/static/js/{index.By43fiCF.js → index._udMrZfX.js} +1 -1
- streamlit/static/static/js/{index.C8r7DD-9.js → index.d0pgY8V8.js} +1 -1
- streamlit/static/static/js/{index.DthY-obI.js → index.dRZ6j1EM.js} +2 -2
- streamlit/static/static/js/{index.Dz6zHKtI.js → index.jk8Nloxj.js} +1 -1
- streamlit/static/static/js/{input.mfVbl2I5.js → input.CYwqmJUN.js} +2 -2
- streamlit/static/static/js/{memory.B-p09GS3.js → memory.CwoWYYJe.js} +1 -1
- streamlit/static/static/js/{mergeWith.D6q7TPdQ.js → mergeWith.CM4ZdUxz.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.QOWTlq5z.js → number-overlay-editor.App3Ir5h.js} +1 -1
- streamlit/static/static/js/{possibleConstructorReturn.DO-pRPNX.js → possibleConstructorReturn.DLN_CW-A.js} +1 -1
- streamlit/static/static/js/{sandbox.DREGkhZ5.js → sandbox.AnJN0uBk.js} +1 -1
- streamlit/static/static/js/{textarea.RxMqblTR.js → textarea.uAcwGUtc.js} +2 -2
- streamlit/static/static/js/{timepicker.BSrUPnyZ.js → timepicker.DDp122zI.js} +4 -4
- streamlit/static/static/js/{toConsumableArray.BkyyIrpf.js → toConsumableArray.CXCskjcZ.js} +1 -1
- streamlit/static/static/js/{uniqueId.CXqhuYjv.js → uniqueId.DQ5uc9Dn.js} +1 -1
- streamlit/static/static/js/{useBasicWidgetState.QQhMYIp5.js → useBasicWidgetState.DFIfVHMH.js} +1 -1
- streamlit/static/static/js/{useOnInputChange.DvWbafRm.js → useOnInputChange.qZzWT6UC.js} +1 -1
- streamlit/static/static/js/{withFullScreenWrapper.CX_bKrfm.js → withFullScreenWrapper.6Cdl0P_3.js} +1 -1
- streamlit/web/server/server.py +7 -6
- streamlit/web/server/server_util.py +24 -0
- {streamlit_nightly-1.46.1.dev20250624.dist-info → streamlit_nightly-1.46.2.dev20250626.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.46.1.dev20250624.dist-info → streamlit_nightly-1.46.2.dev20250626.dist-info}/RECORD +82 -82
- streamlit/static/static/js/index.2JQx94HQ.js +0 -1
- streamlit/static/static/js/index.BM1_hMg8.js +0 -1
- streamlit/static/static/js/index.C78GEvay.js +0 -1
- streamlit/static/static/js/index.CU45_Nrh.js +0 -1
- streamlit/static/static/js/index.CvFBPhOY.js +0 -1
- {streamlit_nightly-1.46.1.dev20250624.data → streamlit_nightly-1.46.2.dev20250626.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.46.1.dev20250624.dist-info → streamlit_nightly-1.46.2.dev20250626.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.46.1.dev20250624.dist-info → streamlit_nightly-1.46.2.dev20250626.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.46.1.dev20250624.dist-info → streamlit_nightly-1.46.2.dev20250626.dist-info}/top_level.txt +0 -0
streamlit/elements/arrow.py
CHANGED
@@ -305,11 +305,11 @@ class ArrowMixin:
|
|
305
305
|
|
306
306
|
If ``data`` is a ``pandas.Styler``, it will be used to style its
|
307
307
|
underlying ``pandas.DataFrame``. Streamlit supports custom cell
|
308
|
-
values and
|
309
|
-
styling options, like bar charts, hovering, and
|
310
|
-
these styling options, use column configuration
|
311
|
-
number formatting from ``column_config`` always
|
312
|
-
over text and number formatting from ``pandas.Styler``.
|
308
|
+
values, colors, and font weights. It does not support some of the
|
309
|
+
more exotic styling options, like bar charts, hovering, and
|
310
|
+
captions. For these styling options, use column configuration
|
311
|
+
instead. Text and number formatting from ``column_config`` always
|
312
|
+
takes precedence over text and number formatting from ``pandas.Styler``.
|
313
313
|
|
314
314
|
Collection-like objects include all Python-native ``Collection``
|
315
315
|
types, such as ``dict``, ``list``, and ``set``.
|
streamlit/elements/code.py
CHANGED
@@ -20,7 +20,7 @@ from typing import TYPE_CHECKING, cast
|
|
20
20
|
from streamlit.elements.lib.layout_utils import (
|
21
21
|
Height,
|
22
22
|
LayoutConfig,
|
23
|
-
|
23
|
+
Width,
|
24
24
|
validate_height,
|
25
25
|
validate_width,
|
26
26
|
)
|
@@ -42,7 +42,7 @@ class CodeMixin:
|
|
42
42
|
line_numbers: bool = False,
|
43
43
|
wrap_lines: bool = False,
|
44
44
|
height: Height | None = "content",
|
45
|
-
width:
|
45
|
+
width: Width = "stretch",
|
46
46
|
) -> DeltaGenerator:
|
47
47
|
"""Display a code block with optional syntax highlighting.
|
48
48
|
|
@@ -85,11 +85,13 @@ class CodeMixin:
|
|
85
85
|
the screen on mobile devices, which makes it hard to scroll the
|
86
86
|
rest of the app.
|
87
87
|
|
88
|
-
width : "stretch" or int
|
88
|
+
width : "stretch", "content", or int
|
89
89
|
The width of the code block element. This can be one of the following:
|
90
90
|
|
91
91
|
- ``"stretch"`` (default): The width of the element matches the
|
92
92
|
width of the parent container.
|
93
|
+
- ``"content"``: The width of the element matches the width of its
|
94
|
+
content, but doesn't exceed the width of the parent container.
|
93
95
|
- An integer specifying the width in pixels: The element has a
|
94
96
|
fixed width. If the specified width is greater than the width of
|
95
97
|
the parent container, the width of the element matches the width
|
@@ -137,7 +139,7 @@ class CodeMixin:
|
|
137
139
|
height = "content"
|
138
140
|
else:
|
139
141
|
validate_height(height, allow_content=True)
|
140
|
-
validate_width(width)
|
142
|
+
validate_width(width, allow_content=True)
|
141
143
|
layout_config = LayoutConfig(height=height, width=width)
|
142
144
|
|
143
145
|
return self.dg._enqueue("code", code_proto, layout_config=layout_config)
|
@@ -134,7 +134,7 @@ def dialog_decorator(title: F, *, width: DialogWidth = "small") -> F: ...
|
|
134
134
|
def dialog_decorator(
|
135
135
|
title: F | str, *, width: DialogWidth = "small"
|
136
136
|
) -> F | Callable[[F], F]:
|
137
|
-
"""Function decorator to create a modal dialog.
|
137
|
+
r"""Function decorator to create a modal dialog.
|
138
138
|
|
139
139
|
A function decorated with ``@st.dialog`` becomes a dialog
|
140
140
|
function. When you call a dialog function, Streamlit inserts a modal dialog
|
@@ -173,6 +173,23 @@ def dialog_decorator(
|
|
173
173
|
----------
|
174
174
|
title : str
|
175
175
|
The title to display at the top of the modal dialog. It cannot be empty.
|
176
|
+
|
177
|
+
The title can optionally contain GitHub-flavored Markdown of the
|
178
|
+
following types: Bold, Italics, Strikethroughs, Inline Code, Links,
|
179
|
+
and Images. Images display like icons, with a max height equal to
|
180
|
+
the font height.
|
181
|
+
|
182
|
+
Unsupported Markdown elements are unwrapped so only their children
|
183
|
+
(text contents) render. Display unsupported elements as literal
|
184
|
+
characters by backslash-escaping them. E.g.,
|
185
|
+
``"1\. Not an ordered list"``.
|
186
|
+
|
187
|
+
See the ``body`` parameter of |st.markdown|_ for additional,
|
188
|
+
supported Markdown directives.
|
189
|
+
|
190
|
+
.. |st.markdown| replace:: ``st.markdown``
|
191
|
+
.. _st.markdown: https://docs.streamlit.io/develop/api-reference/text/st.markdown
|
192
|
+
|
176
193
|
width : "small", "large"
|
177
194
|
The width of the modal dialog. If ``width`` is ``"small`` (default), the
|
178
195
|
modal dialog will be 500 pixels wide. If ``width`` is ``"large"``, the
|
@@ -23,6 +23,7 @@ from typing import TYPE_CHECKING, Literal, TypedDict
|
|
23
23
|
from typing_extensions import NotRequired, TypeAlias
|
24
24
|
|
25
25
|
from streamlit.runtime.metrics_util import gather_metrics
|
26
|
+
from streamlit.string_util import validate_material_icon
|
26
27
|
|
27
28
|
if TYPE_CHECKING:
|
28
29
|
from collections.abc import Iterable
|
@@ -38,6 +39,7 @@ NumberFormat: TypeAlias = Literal[
|
|
38
39
|
"scientific",
|
39
40
|
"engineering",
|
40
41
|
"accounting",
|
42
|
+
"bytes",
|
41
43
|
]
|
42
44
|
|
43
45
|
ColumnWidth: TypeAlias = Literal["small", "medium", "large"]
|
@@ -429,6 +431,7 @@ def NumberColumn(
|
|
429
431
|
- ``"euro"``: Show the number as a euro amount (e.g. "€1,234.57").
|
430
432
|
- ``"yen"``: Show the number as a yen amount (e.g. "¥1,235").
|
431
433
|
- ``"accounting"``: Show the number in an accounting format (e.g. "1,234.00").
|
434
|
+
- ``"bytes"``: Show the number in a byte format (e.g. "1.2KB").
|
432
435
|
- ``"compact"``: Show the number in a compact format (e.g. "1.2K").
|
433
436
|
- ``"scientific"``: Show the number in scientific notation (e.g. "1.235E3").
|
434
437
|
- ``"engineering"``: Show the number in engineering notation (e.g. "1.235E3").
|
@@ -711,6 +714,7 @@ def LinkColumn(
|
|
711
714
|
|
712
715
|
- ``None`` (default) to display the URL itself.
|
713
716
|
- A string that is displayed in every cell, e.g. ``"Open link"``.
|
717
|
+
- A material icon displayed in every cell, e.g. ``":material/open_in_new:"``
|
714
718
|
- A JS-flavored regular expression (detected by usage of parentheses)
|
715
719
|
to extract a part of the URL via a capture group. For example, use
|
716
720
|
``"https://(.*?)\.example\.com"`` to extract the display text
|
@@ -768,6 +772,8 @@ def LinkColumn(
|
|
768
772
|
https://doc-link-column.streamlit.app/
|
769
773
|
height: 300px
|
770
774
|
"""
|
775
|
+
if display_text and display_text.startswith(":material/"):
|
776
|
+
display_text = validate_material_icon(display_text)
|
771
777
|
|
772
778
|
return ColumnConfig(
|
773
779
|
label=label,
|
@@ -2005,6 +2011,7 @@ def ProgressColumn(
|
|
2005
2011
|
- ``"euro"``: Show the number as a euro amount (e.g. "€1,234.57").
|
2006
2012
|
- ``"yen"``: Show the number as a yen amount (e.g. "¥1,235").
|
2007
2013
|
- ``"accounting"``: Show the number in an accounting format (e.g. "1,234.00").
|
2014
|
+
- ``"bytes"``: Show the number in a byte format (e.g. "1.2KB").
|
2008
2015
|
- ``"compact"``: Show the number in a compact format (e.g. "1.2K").
|
2009
2016
|
- ``"scientific"``: Show the number in scientific notation (e.g. "1.235E3").
|
2010
2017
|
- ``"engineering"``: Show the number in engineering notation (e.g. "1.235E3").
|
streamlit/elements/metric.py
CHANGED
@@ -20,7 +20,13 @@ from typing import TYPE_CHECKING, Any, Literal, Union, cast
|
|
20
20
|
|
21
21
|
from typing_extensions import TypeAlias
|
22
22
|
|
23
|
-
from streamlit.elements.lib.layout_utils import
|
23
|
+
from streamlit.elements.lib.layout_utils import (
|
24
|
+
Height,
|
25
|
+
LayoutConfig,
|
26
|
+
Width,
|
27
|
+
validate_height,
|
28
|
+
validate_width,
|
29
|
+
)
|
24
30
|
from streamlit.elements.lib.policies import maybe_raise_label_warnings
|
25
31
|
from streamlit.elements.lib.utils import (
|
26
32
|
LabelVisibility,
|
@@ -60,6 +66,7 @@ class MetricMixin:
|
|
60
66
|
label_visibility: LabelVisibility = "visible",
|
61
67
|
border: bool = False,
|
62
68
|
width: Width = "stretch",
|
69
|
+
height: Height = "content",
|
63
70
|
) -> DeltaGenerator:
|
64
71
|
r"""Display a metric in big bold font, with an optional indicator of how the metric changed.
|
65
72
|
|
@@ -124,6 +131,16 @@ class MetricMixin:
|
|
124
131
|
``False`` (default), no border is shown. If this is ``True``, a
|
125
132
|
border is shown.
|
126
133
|
|
134
|
+
height : "content", "stretch", or int
|
135
|
+
The height of the metric element. This can be one of the following:
|
136
|
+
|
137
|
+
- ``"content"`` (default): The height of the element matches the
|
138
|
+
height of its content, but doesn't exceed the height of the
|
139
|
+
parent container.
|
140
|
+
- ``"stretch"``: The height of the element matches the height of the
|
141
|
+
parent container.
|
142
|
+
- An integer specifying the height in pixels.
|
143
|
+
|
127
144
|
width : "stretch", "content", or int
|
128
145
|
The width of the metric element. This can be one of the following:
|
129
146
|
|
@@ -218,8 +235,9 @@ class MetricMixin:
|
|
218
235
|
label_visibility
|
219
236
|
)
|
220
237
|
|
238
|
+
validate_height(height, allow_content=True)
|
221
239
|
validate_width(width, allow_content=True)
|
222
|
-
layout_config = LayoutConfig(width=width)
|
240
|
+
layout_config = LayoutConfig(width=width, height=height)
|
223
241
|
|
224
242
|
return self.dg._enqueue("metric", metric_proto, layout_config=layout_config)
|
225
243
|
|
@@ -20,6 +20,11 @@ from typing import TYPE_CHECKING, Any, Callable, Generic, Literal, cast, overloa
|
|
20
20
|
|
21
21
|
from streamlit.dataframe_util import OptionSequence, convert_anything_to_list
|
22
22
|
from streamlit.elements.lib.form_utils import current_form_id
|
23
|
+
from streamlit.elements.lib.layout_utils import (
|
24
|
+
LayoutConfig,
|
25
|
+
WidthWithoutContent,
|
26
|
+
validate_width,
|
27
|
+
)
|
23
28
|
from streamlit.elements.lib.options_selector_utils import (
|
24
29
|
convert_to_sequence_and_check_comparable,
|
25
30
|
create_mappings,
|
@@ -170,6 +175,7 @@ class MultiSelectMixin:
|
|
170
175
|
disabled: bool = False,
|
171
176
|
label_visibility: LabelVisibility = "visible",
|
172
177
|
accept_new_options: Literal[False] = False,
|
178
|
+
width: WidthWithoutContent = "stretch",
|
173
179
|
) -> list[T]: ...
|
174
180
|
|
175
181
|
@overload
|
@@ -190,6 +196,7 @@ class MultiSelectMixin:
|
|
190
196
|
disabled: bool = False,
|
191
197
|
label_visibility: LabelVisibility = "visible",
|
192
198
|
accept_new_options: Literal[True] = True,
|
199
|
+
width: WidthWithoutContent = "stretch",
|
193
200
|
) -> list[T | str]: ...
|
194
201
|
|
195
202
|
@overload
|
@@ -210,6 +217,7 @@ class MultiSelectMixin:
|
|
210
217
|
disabled: bool = False,
|
211
218
|
label_visibility: LabelVisibility = "visible",
|
212
219
|
accept_new_options: bool = False,
|
220
|
+
width: WidthWithoutContent = "stretch",
|
213
221
|
) -> list[T] | list[T | str]: ...
|
214
222
|
|
215
223
|
@gather_metrics("multiselect")
|
@@ -230,6 +238,7 @@ class MultiSelectMixin:
|
|
230
238
|
disabled: bool = False,
|
231
239
|
label_visibility: LabelVisibility = "visible",
|
232
240
|
accept_new_options: Literal[False, True] | bool = False,
|
241
|
+
width: WidthWithoutContent = "stretch",
|
233
242
|
) -> list[T] | list[T | str]:
|
234
243
|
r"""Display a multiselect widget.
|
235
244
|
The multiselect widget starts as empty.
|
@@ -332,6 +341,17 @@ class MultiSelectMixin:
|
|
332
341
|
can't be added if a case-insensitive match is already selected. The
|
333
342
|
``max_selections`` argument is still enforced.
|
334
343
|
|
344
|
+
width : "stretch" or int
|
345
|
+
The width of the multiselect widget. This can be one of the
|
346
|
+
following:
|
347
|
+
|
348
|
+
- ``"stretch"`` (default): The width of the widget matches the
|
349
|
+
width of the parent container.
|
350
|
+
- An integer specifying the width in pixels: The widget has a
|
351
|
+
fixed width. If the specified width is greater than the width of
|
352
|
+
the parent container, the width of the widget matches the width
|
353
|
+
of the parent container.
|
354
|
+
|
335
355
|
Returns
|
336
356
|
-------
|
337
357
|
list
|
@@ -397,6 +417,7 @@ class MultiSelectMixin:
|
|
397
417
|
disabled=disabled,
|
398
418
|
label_visibility=label_visibility,
|
399
419
|
accept_new_options=accept_new_options,
|
420
|
+
width=width,
|
400
421
|
ctx=ctx,
|
401
422
|
)
|
402
423
|
|
@@ -417,6 +438,7 @@ class MultiSelectMixin:
|
|
417
438
|
disabled: bool = False,
|
418
439
|
label_visibility: LabelVisibility = "visible",
|
419
440
|
accept_new_options: bool = False,
|
441
|
+
width: WidthWithoutContent = "stretch",
|
420
442
|
ctx: ScriptRunContext | None = None,
|
421
443
|
) -> list[T] | list[T | str]:
|
422
444
|
key = to_key(key)
|
@@ -457,6 +479,7 @@ class MultiSelectMixin:
|
|
457
479
|
max_selections=max_selections,
|
458
480
|
placeholder=placeholder,
|
459
481
|
accept_new_options=accept_new_options,
|
482
|
+
width=width,
|
460
483
|
)
|
461
484
|
|
462
485
|
proto = MultiSelectProto()
|
@@ -503,10 +526,13 @@ class MultiSelectMixin:
|
|
503
526
|
proto.raw_values[:] = serde.serialize(widget_state.value)
|
504
527
|
proto.set_value = True
|
505
528
|
|
529
|
+
validate_width(width)
|
530
|
+
layout_config = LayoutConfig(width=width)
|
531
|
+
|
506
532
|
if ctx:
|
507
533
|
save_for_app_testing(ctx, element_id, format_func)
|
508
534
|
|
509
|
-
self.dg._enqueue(widget_name, proto)
|
535
|
+
self.dg._enqueue(widget_name, proto, layout_config=layout_config)
|
510
536
|
|
511
537
|
return widget_state.value
|
512
538
|
|
streamlit/static/index.html
CHANGED
@@ -37,7 +37,7 @@
|
|
37
37
|
<script>
|
38
38
|
window.prerenderReady = false
|
39
39
|
</script>
|
40
|
-
<script type="module" crossorigin src="./static/js/index.
|
40
|
+
<script type="module" crossorigin src="./static/js/index.Du_GhChx.js"></script>
|
41
41
|
<link rel="stylesheet" crossorigin href="./static/css/index.CJVRHjQZ.css">
|
42
42
|
</head>
|
43
43
|
<body>
|