Skip to content

REF007: popup-param-mismatch

Parameter passed to a view that the view does not declare

Code REF007
Name popup-param-mismatch
Category References (REF)
Default severity warning
Enabled by default yes
Fix available no
ign-lint equivalent none

Checks the parameter names passed to a view against the parameters the target view declares: props.params of embedded views, flex repeater instances, view canvas, carousel, accordion, dashboard and table viewParams, popup, navigate and alter-dock action viewParams, dock viewParams in the page configuration, and the parameters dict literal of script calls system.perspective.openPopup, togglePopup and navigate(view=..., params=...) with a literal view path.

Perspective ignores a parameter the view does not declare, so the value never arrives. This is usually a typo or a parameter that was renamed in the target view.

Bound parameter objects (the literal is only a cached value), references to views that do not exist (see REF001) and the flex repeater's own instanceStyle and instancePosition keys are not reported.

The view Popups/Motor declares the parameter motorId:

{"type": "popup", "config": {"type": "open", "viewPath": "Popups/Motor", "viewParams": {"motor": 3}}}

Use instead:

{"type": "popup", "config": {"type": "open", "viewPath": "Popups/Motor", "viewParams": {"motorId": 3}}}

Generated from the rule metadata by iglint generate-docs; iglint rule REF007 prints the same page in the terminal. Source: docs/rules/REF007.md.