Skip to content

reflex-components-core@0.12.0a1

Pre-release
Pre-release

Choose a tag to compare

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 enforce mode: REFLEX_SESSION_TOKEN_MODE=warn or off turns the rejection off and is only an escape hatch. See the browser session guide for configuration and migration. (#7364)
  • Form on_submit now builds form_data only from each control's name, as deprecated in 0.10.1: a control's id no longer adds a field, and no longer replaces the value submitted under a name equal to it. Give every submitted control a name, e.g. rx.input(id="email") becomes rx.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 static id but no name. (#7540)

Features

  • File uploads now carry the browser session cookie, and with REFLEX_SESSION_TOKEN_MODE=enforce an upload for a client token that the session does not own returns HTTP 403. (#7362)
  • rx.el.img, rx.el.link, rx.el.script and rx.script take fetch_priority ("high", "low" or "auto"), rendered as the fetchpriority attribute, and rx.el.source takes the width and height of its image in pixels. Since width and height on rx.el.img stay CSS, give the fallback image of a picture its size as attributes with custom_attrs={"width": 800, "height": 400}. (#8051)

Bug Fixes

  • Ship a py.typed marker so type checkers such as mypy read the package's bundled .pyi stubs instead of treating it as untyped. (#7710)
  • A control rendered by rx.form.control inside a named rx.form.field now counts as submitting under the field's name, so compiling the form no longer warns that it is only submitted by its id, and the name fills a required field of a TypedDict submit handler. (#7724)
  • rx.match now matches a set case by set equality, so rx.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_listener registers 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.foreach validates and names its render function's parameters by the positional ones only, so a bound method, a keyword-only parameter or **kwargs no longer counts as the index parameter. (#7957)

Documentation

  • Fix a doubled word in the x2 and y2 prop descriptions of rx.el.line. (#7930)
  • Fix the docstrings of rx.el.h2 through rx.el.h6, which all described the h1 element. (#7979)