Repository navigation
reflex-components-core@0.12.0a1
Pre-release
Pre-release
Breaking Changes
- File uploads carry the browser session cookie, and an upload for a client token that the session does not own returns HTTP 403. Keep the default
enforcemode:REFLEX_SESSION_TOKEN_MODE=warnoroffturns the rejection off and is only an escape hatch. See the browser session guide for configuration and migration. (#7364) - Form
on_submitnow buildsform_dataonly from each control'sname, as deprecated in 0.10.1: a control'sidno longer adds a field, and no longer replaces the value submitted under anameequal to it. Give every submitted control aname, e.g.rx.input(id="email")becomesrx.input(id="email", name="email"). Compiling a form whose submit handler takes the form data still warns about each value-bearing control that has a staticidbut noname. (#7540)
Features
- File uploads now carry the browser session cookie, and with
REFLEX_SESSION_TOKEN_MODE=enforcean upload for a client token that the session does not own returns HTTP 403. (#7362) rx.el.img,rx.el.link,rx.el.scriptandrx.scripttakefetch_priority("high","low"or"auto"), rendered as thefetchpriorityattribute, andrx.el.sourcetakes thewidthandheightof its image in pixels. Sincewidthandheightonrx.el.imgstay CSS, give the fallback image of a picture its size as attributes withcustom_attrs={"width": 800, "height": 400}. (#8051)
Bug Fixes
- Ship a
py.typedmarker so type checkers such as mypy read the package's bundled.pyistubs instead of treating it as untyped. (#7710) - A control rendered by
rx.form.controlinside a namedrx.form.fieldnow counts as submitting under the field'sname, so compiling the form no longer warns that it is only submitted by itsid, and the name fills a required field of aTypedDictsubmit handler. (#7724) rx.matchnow matches a set case by set equality, sorx.match(State.tags, ({"c", "d"}, ...))no longer depends on the order in which the server sent the set. Matches without a set compile as before. (#7890)rx.window_event_listenerregisters its handler again whenever the handler changes, so a handler that reads state or client state no longer keeps the values from the first render. (#7941)- An object or boolean Var rendered as a child now brings along the hooks and imports of its
to_string(), so a Var type with its own string form no longer breaks the page. (#7944) rx.foreachvalidates and names its render function's parameters by the positional ones only, so a bound method, a keyword-only parameter or**kwargsno longer counts as the index parameter. (#7957)