web/forms: fix forms not resetting state when modal closes#19562
web/forms: fix forms not resetting state when modal closes#19562GirlBossRush merged 3 commits intomainfrom
Conversation
✅ Deploy Preview for authentik-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for authentik-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #19562 +/- ##
==========================================
+ Coverage 93.25% 93.28% +0.02%
==========================================
Files 949 949
Lines 52131 52131
==========================================
+ Hits 48617 48629 +12
+ Misses 3514 3502 -12
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
authentik PR Installation instructions Instructions for docker-composeAdd the following block to your AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-aa7203726d50199ceb54f5f3e099918ef09131b1
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)sAfterwards, run the upgrade commands from the latest release notes. Instructions for KubernetesAdd the following block to your authentik:
outposts:
container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
global:
image:
repository: ghcr.io/goauthentik/dev-server
tag: gh-aa7203726d50199ceb54f5f3e099918ef09131b1Afterwards, run the upgrade commands from the latest release notes. |
52405e2 to
ef936b5
Compare
Overview: Forms were not properly resetting their state when closing modals, which caused stale values to persist when reopening forms. This affected all forms with @State() decorated properties. Testing: 1. Create any item (user, token, application, etc.), close modal 2. Click Create again, form should show default/empty values 3. Edit an item, cancel, click Create - form should be empty 4. Edit an item, cancel, edit same item - should show correct data Motivation: Form inputs retained values from previous create/edit operations.
ef936b5 to
cbfaae3
Compare
cbfaae3 to
aa72037
Compare
|
@dominic-r This is a great improvement over the current behavior. #19395, and its follow up in #18916 solves this by completely clearing the modal from the page, but that'll take some time to merge. This PR touches a lot of places so I've pushed up a few type changes which allow these changes to merge into #19395:
|
|
Thanks for these great updates @GirlBossRush ! |
|
|
…experiment * main: sources/saml: properly catch InvalidSignature exception (#19641) sources/saml: Set AuthnRequest ProtocolBinding to HTTP-POST instead of HTTP-Redirect (#17378) website/docs: update endpoint agent windows log location (#19645) core: bump library/node from 25.3.0-trixie to 25.4.0-trixie in /website (#19632) core, web: update translations (#19535) core: bump github.com/pires/go-proxyproto from 0.8.1 to 0.9.0 (#19628) core: bump django-stubs[compatible-mypy] from 5.2.8 to 5.2.9 (#19629) web: bump @types/react from 19.2.8 to 19.2.9 in /web in the react group across 1 directory (#19631) core: bump sentry-sdk from 2.49.0 to 2.50.0 (#19630) website/integrations: update qnap (#19644) website/docs: Update saml google workspace guide (#19624) web/elements: reduce spacing between collapsible form groups (#19627) web/forms: fix forms not resetting state when modal closes (#19562) web/user: fix Firefox for Android infinite render loop in user library (#19379)
* web/forms: fix forms not resetting state when modal closes Overview: Forms were not properly resetting their state when closing modals, which caused stale values to persist when reopening forms. This affected all forms with @State() decorated properties. Testing: 1. Create any item (user, token, application, etc.), close modal 2. Click Create again, form should show default/empty values 3. Edit an item, cancel, click Create - form should be empty 4. Edit an item, cancel, edit same item - should show correct data Motivation: Form inputs retained values from previous create/edit operations. * Fix linter errors, types. * Add property accessors, types. --------- Co-authored-by: Teffen Ellis <592134+GirlBossRush@users.noreply.github.com>
#19562 to version-2025.12) (#19635) web/forms: fix forms not resetting state when modal closes (#19562) * web/forms: fix forms not resetting state when modal closes Overview: Forms were not properly resetting their state when closing modals, which caused stale values to persist when reopening forms. This affected all forms with @State() decorated properties. Testing: 1. Create any item (user, token, application, etc.), close modal 2. Click Create again, form should show default/empty values 3. Edit an item, cancel, click Create - form should be empty 4. Edit an item, cancel, edit same item - should show correct data Motivation: Form inputs retained values from previous create/edit operations. * Fix linter errors, types. * Add property accessors, types. --------- Co-authored-by: Dominic R <dominic@sdko.org> Co-authored-by: Teffen Ellis <592134+GirlBossRush@users.noreply.github.com>
Overview:
Forms were not properly resetting their state when closing modals, which caused stale values to persist when reopening forms. This affected all forms with
@state()decorated properties.Testing:
Motivation:
Form inputs retained values from previous create/edit operations.