Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The js_action JS handlers set element props and invalidate the vnode cache, but Vue's reactivity doesn't trigger a re-render because the cached render path short-circuits before reading element props, so the dependency is never tracked. Adding $forceUpdate() ensures Vue picks up the prop change after cache invalidation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Set LOOPBACK = False so backdrop/outside clicks update model-value directly on the client without a server round-trip. Also fix the client-side loopback handler: unwrap single-element args arrays and call $forceUpdate() to ensure Vue re-renders after cache invalidation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add type: ignore for update_wrapper on _JsActionDescriptor - Add type: ignore for JsAction callbacks passed to on() in fab/dropdown - Replace ValueElement import with hasattr check to break cyclic import (nicegui.element -> nicegui.js_action -> nicegui.elements.mixins.value_element) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add type: ignore for JsAction callbacks passed to on() in button, chip, and item elements. The JsAction handler type doesn't match GenericEventArguments but works correctly at runtime since it ignores event arguments entirely. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use proper typing instead of suppressing mypy errors: - Add JsAction to Element.on() handler type since it already handles it at runtime - Use TypeGuard for has_js_action() to enable mypy type narrowing - Replace functools.update_wrapper with manual attribute copying to avoid arg-type mismatch - Use explicit _JsActionDescriptor return types instead of TypeVar cast Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Opened by Claude Code on Evan's behalf.
Continuation of zauberzeug#5843 (
@js_actiondecorator for client-side open/close/toggle optimization), moved to the fork because:Kept here for the day the trade-off flips (e.g. INP regresses again, or upstream grows a client-side-actions story). Branch is
jsactionas closed upstream; merge conflicts with upstream main are unresolved as of moving.