Save and restore dashboard filters and controls in embedded apps
Users who filter or configure an embedded dashboard lose that view the moment they navigate away or close the tab. This guide walks through capturing a user’s filter and control selections with embed events, storing them outside the dashboard, and reapplying them later, so users can build a set of views they return to without redoing that work every time. It also covers what’s possible, and what isn’t, for embedded apps.This is especially relevant if:
You embed dashboards in your application and want users to save and switch between multiple configured views of the same dashboard
You want those preferences to persist across browser sessions or devices, not just within a single page load
You’re building save, rename, duplicate, or delete controls for saved views around an embedded dashboard or app
How persistence works
The pattern has two halves: your application listens for state events coming out of the dashboard, and your application sends that state back into the dashboard on demand. Between those two steps, you decide where saved configurations live and how they’re matched back up with what’s currently on screen.Dashboards have two kinds of state worth saving, and Omni treats them as separate systems with separate events: filters a viewer sets, and controls (field switchers, timeframe pickers, top N selectors, and similar) built into the dashboard itself.
The embed events involved
For filters, the dashboard emits dashboard:filters with the full current filter state whenever a user applies one. Your application sends dashboard:set-filters into the dashboard’s iframe to apply a saved configuration; only the filters included in that payload change, and any filters left out keep their existing values.
dashboard:set-filters and the older dashboard:filter-change-by-url-parameter are synonyms — they take the same payload and Omni handles them the same way. Use dashboard:set-filters in new code.
Controls work the same way, with their own pair of events: dashboard:controls reports every control’s current state, and dashboard:set-controls applies saved control values back onto the dashboard.
dashboard:filter-changed and dashboard:control-changed are also available if you only need to react to what just changed (for example, to log which filter or control a user just touched) rather than the full state every time.
Where configurations get stored
localStorage is the fastest way to get this working, and it’s fine for a single-user, single-device scenario. For anything a user should be able to reach from another device, or that your team needs to manage, store configurations in your own backend instead, keyed to the user and the dashboard.
Set up two-way messaging
Both directions use the browser’s postMessage API, so you need a listener for events coming from Omni and a way to post events into the dashboard’s iframe.
Wait for the right readiness event
Before sending anything into the iframe, wait for Omni to say it’s listening. page:ready fires once the embedded page can receive events at all; dashboard:ready fires every time a dashboard finishes loading, including after in-app navigation, and is the event to key off if you want to reapply a saved view each time a dashboard loads.
useEffect(() => { const listener = (event: MessageEvent) => { if (event.origin !== "https://your-org.embed-omniapp.co") return; if (event.data?.name === "dashboard:ready") { const { dashboardId } = event.data.payload; applySavedViewIfAny(dashboardId); } }; // Add the listener before the iframe starts to load window.addEventListener("message", listener); return () => window.removeEventListener("message", listener);}, []);
Omni queues dashboard:set-filters and dashboard:set-controls events sent before the dashboard is ready and applies them once it is, so sending slightly early isn’t harmful, but waiting for dashboard:ready is the documented way to avoid racing the dashboard’s own initial-filter event and avoids guessing at a load-complete signal.
Listen for filter and control changes
Add a message listener on the parent window and filter for events from your Omni embed domain:
useEffect(() => { const listener = (event: MessageEvent) => { // Only accept messages from your known embed origin if (event.origin !== "https://your-org.embed-omniapp.co") return; if (event.data?.name === "dashboard:filters") { setCurrentFilters(event.data.payload); } if (event.data?.name === "dashboard:controls") { setCurrentControls(event.data.payload); } }; window.addEventListener("message", listener); return () => window.removeEventListener("message", listener);}, []);
Check event.origin against your exact embed domain (or vanity domain, if you’ve set one up) rather than a substring match, so a page on an unrelated domain that happens to contain your domain name as a substring can’t get its messages processed.
Send filters and controls back to the dashboard
Each filter in a dashboard:filters payload includes an asJsonUrlSearchParam value; each control in a dashboard:controls payload includes an asUrlSearchParam value (which can be null — skip those rather than joining them). Join the ones you want to restore and send them as dashboard:set-filters and dashboard:set-controls events:
Use your actual embed origin as the target in postMessage, not a wildcard (*). A wildcard target sends the message to whatever origin the iframe happens to be pointed at, including one an attacker redirected it to.
A child control that follows a parent control reports a nullasUrlSearchParam on purpose — the parent’s own parameter reproduces it. Sending an explicit value for that child would win over the parent on replay and stop it from following later parent changes, so leaving it out (which the filter(Boolean) above already does) is correct, not an oversight.
Handle timing and normalization issues
Two dashboards with the same filters and controls applied don’t always produce identical payloads, so comparing saved state against current state takes a bit of care.
Filter out inactive and display-only fields
dashboard:filters includes every filter defined on the dashboard, not just the ones a user has actually set, and dashboard:controls likewise lists every control, including ones with no URL value. Presence in either payload doesn’t mean something is active, so check values before treating an entry as part of the user’s configuration: for list filters, check that values has at least one entry; for date ranges, check that the range bounds are non-null; for controls, check value rather than assuming the key means anything.The payload can also include display-only properties, such as appliedLabels on a filter, that vary between otherwise-identical states. Strip these before comparing two configurations or storing one.
Compare state reliably
If you want to detect whether a user’s current filters match a saved configuration, don’t compare the raw strings. Parse each filter’s JSON, remove display-only keys, sort the remaining keys, and re-serialize before comparing:
const DISPLAY_ONLY_KEYS = new Set(["appliedLabels"]);function canonicalize(value: unknown): string { if (value && typeof value === "object") { const keys = Object.keys(value) .filter((key) => !DISPLAY_ONLY_KEYS.has(key)) .sort(); return `{${keys.map((k) => `${JSON.stringify(k)}:${canonicalize((value as any)[k])}`).join(",")}}`; } return JSON.stringify(value);}
Manage saved configurations
Once capture and restore are working, the rest is standard CRUD against whatever store you chose.
Update, rename, and duplicate
Update a configuration by replacing its stored filters and controls with the current state; rename or duplicate it by copying the record and changing its name or ID. None of these operations touch the dashboard directly, they only change what you have saved.
Isolate configurations by user and dashboard
Filter and control specifications are specific to the dashboard they came from and won’t produce the intended result if applied to a different one, so key your stored configurations by dashboard ID as well as by user. If configurations are stored client-side, clear them when a user switches dashboards or accounts; if they’re stored on your backend, scope queries to the current user and organization.
Embedded apps
Apps follow a different model, and the dashboard pattern above doesn’t carry over directly. An app manages its own query filters internally through omni.query(name).setFilter() and .removeFilter() calls in the app’s own code, and Omni doesn’t currently expose an inbound embed event that lets your page set those filters from outside.What you can do from your embedding page is observe what’s happening inside the app and react to it:
app:filter-changed reports the app’s complete filter overrides after each change, keyed by query name and field, plus a changed array describing just what’s different. app:event carries whatever an app’s own code chooses to emit with omni.emit(name, payload), which is useful if the app you’re embedding was built to broadcast its own selections (a row click, a view toggle) rather than only its query filters.To actually restore a saved state inside an app, the restoration logic has to live in the app’s own code, reading from wherever the app persists its state (an Omni user attribute, a call to your backend, or omni SDK storage inside the app) and calling setFilter() itself on load. Your embedding page can supply a user attribute, a signed parameter, or data through app:event for the app to consume, but it can’t force a filter into the app the way dashboard:set-filters forces one into a dashboard.
Known limitations
Omni’s embed events don’t support clearing all filters or controls on a dashboard programmatically. Sending an empty filterUrlParameter or an empty controlUrlParameters array won’t reset the dashboard to its unfiltered, default-control state.
Work around this by giving users a saved “default” configuration with no filters or non-default controls applied, or by remounting the dashboard iframe (for example, by changing its key or re-signing its URL) to force it back to its initial state. Remounting loses the user’s scroll position, but it’s the most reliable way to get a clean slate.
Next steps
Read the embed events overview for the full list of events Omni can send and receive
Set up a vanity domain if you haven’t already, so your application and the embedded dashboard share a top-level domain
Reference filterSearchParam if you’d rather set a user’s initial filters at login instead of after the dashboard has loaded
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Omni Docs","colors":{"primary":"#FF5FA2","light":"#FF5FA2","dark":"#4D122C"},"logo":{"light":"https://mintcdn.com/omni-e7402367/m1fg0tfdkEcnYhky/images/logo/omni-black.png?fit=max\u0026auto=format\u0026n=m1fg0tfdkEcnYhky\u0026q=85\u0026s=85b81b605382b15b60eb75159899002a","dark":"https://mintcdn.com/omni-e7402367/m1fg0tfdkEcnYhky/images/logo/omni-white.png?fit=max\u0026auto=format\u0026n=m1fg0tfdkEcnYhky\u0026q=85\u0026s=18b529bed326b4f1be9d58ac65b9e002"},"favicon":"https://mintcdn.com/omni-e7402367/WTWdmWXPOMD5jOUY/favicon.png?fit=max\u0026auto=format\u0026n=WTWdmWXPOMD5jOUY\u0026q=85\u0026s=775ee4acbc06107599e3471e50161a2b","background":{"color":{"light":"#FCFCF7","dark":"#0e0b0e"}},"navbar":{"links":[{"href":"https://community.omni.co","label":"Community"}],"primary":{"type":"button","label":"Try Omni!","href":"https://omni.co/demo"}},"footer":{},"seo":{"metatags":{"canonical":"https://docs.omni.co"}},"fonts":{"heading":{"family":"Cal Sans","weight":400},"body":{"family":"IBM Plex Sans"}},"integrations":{"ga4":{"measurementId":"G-ZMG0QT2W9L"}},"banner":{"content":"Need help? Get answers from the docs with Omni's in-app AI! Log in to your Omni instance and open the [Omni Agent](/ai/chat) in the sidebar.","dismissible":true},"thumbnails":{"appearance":"dark","background":"https://mintcdn.com/omni-e7402367/J1q2UvTSjLHOwJ3G/images/og/og-background.png?fit=max\u0026auto=format\u0026n=J1q2UvTSjLHOwJ3G\u0026q=85\u0026s=63ad1c86bdbf4da4196959c391afb21f","fonts":{"family":"IBM Plex Sans"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"omni-e7402367","hasAudioNarration":false,"actualSubdomain":"omni-e7402367","customDomains":["docs.omni.co"],"gitSource":{"type":"github","owner":"exploreomni","repo":"mintlify-omni","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6afdee34a15136583bf7a236","clientVersion":"0.0.4177","searchFilterCounts":[{"language":"default","tag":"Docs","count":509},{"language":"default","tag":"Developers","count":382},{"language":"default","tag":"Model data","count":305},{"language":"default","tag":"REST APIs","count":257},{"language":"default","tag":"Parameters","count":189},{"language":"default","tag":"Product updates","count":162},{"language":"default","tag":"Demos","count":158},{"language":"default","tag":"Admin","count":126},{"language":"default","tag":"Visualize \u0026 present","count":98},{"language":"default","tag":"Embedding","count":87}],"searchSettings":{"isFiltersEnabled":true,"maxResults":10,"fullPageSearch":true}},"assistantConfig":{"enableAskAiButton":true,"enableAskAiSearchBar":false},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"privacy":{"consentBanner":{"enabled":false}},"googleFontsInlined":true},"customCss":[{"filePath":"styles.css","content":"img{border:1px solid;border-color:rgb(var(--gray-200))}.no-border{border:0px}.nav-logo{border:0px}#banner{color:#FCFCF7;font-weight:600;a {\n color: #FCFCF7;\n font-weight: 600;\n }}#topbar-cta-button{background-color:#FF5FA2;color:#FCFCF7!important;padding:0;border-radius:160px;text-decoration:none;font-weight:800;cursor:pointer;transition:background-color 0.2s ease, transform 0.1s ease}#topbar-cta-button span{background-color:transparent!important}#topbar-cta-button>a{padding:8px 14px!important}#topbar-cta-button *{color:#FCFCF7!important}#topbar-cta-button:hover{background-color:#FF5FA2;transform:translateY(-1px)}#topbar-cta-button:active{transform:translateY(0)}#topbar-cta-button svg{display:none!important}.navbar-link a{border-radius:160px!important}.dark .navbar-link a{background-color:rgb(255 255 255 / 0.1)!important}.dark .navbar-link a:hover{background-color:rgb(255 255 255 / 0.2)!important}[data-testid=\"rss-feed-button\"]{border-color:#FF5FA2!important;color:#FF5FA2!important;border-radius:160px!important;gap:6px;transition:background-color 0.2s ease, transform 0.1s ease}[data-testid=\"rss-feed-button\"]::after{content:\"Subscribe\";font-size:14px;font-weight:600}[data-testid=\"rss-feed-button\"] svg{stroke:#FF5FA2}[data-testid=\"rss-feed-button\"]:hover{background-color:rgba(255, 95, 162, 0.05)!important;transform:translateY(-1px)}.dark [data-testid=\"rss-feed-button\"]:hover{background-color:rgba(255, 95, 162, 0.1)!important}[class*=\"cursor-copy\"][class*=\"max-h-\"]{max-height:20px!important}:has(>.guide-header){position:relative;max-width:1100px;margin:0 auto;padding:24px 24px 72px calc(200px + 48px + 24px);color:rgb(var(--gray-700))}.dark :has(>.guide-header){color:rgb(var(--gray-400))}.guide-header{position:sticky;top:var(--scroll-mt, 9.5rem);z-index:20;background-color:#FCFCF7;padding:0px 0px 1px;margin-bottom:35px;box-shadow:0 -10rem 0 10rem #FCFCF7}.dark .guide-header{background-color:#0e0b0e;box-shadow:0 -10rem 0 10rem #0e0b0e}.guide-title{font-size:2.5rem;font-weight:700;color:rgb(var(--gray-900));margin:0;line-height:1.3}.dark .guide-title{color:rgb(var(--gray-50))}.guide-sidebar{position:absolute;left:24px;top:24px;bottom:0;width:200px}.guide-sidebar-content{position:sticky;top:calc(var(--scroll-mt, 9.5rem) + 10px)}.guide-sidebar-back{display:flex;align-items:center;gap:8px;color:rgb(var(--gray-500));text-decoration:none;font-size:14px;font-weight:500;margin-bottom:24px;transition:color 0.15s ease}.guide-sidebar-back:hover{color:rgb(var(--primary))}.guide-sidebar-section{margin-bottom:20px}.guide-sidebar-label{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;color:rgb(var(--gray-500));margin-bottom:6px}.guide-sidebar-category{display:flex;align-items:center;gap:6px;font-size:14px;color:rgb(var(--gray-700));text-transform:capitalize}.dark .guide-sidebar-category{color:rgb(var(--gray-300))}.guide-sidebar-date{font-size:14px;color:rgb(var(--gray-600))}.dark .guide-sidebar-date{color:rgb(var(--gray-400))}.guide-sidebar-links{list-style:none;padding:0;margin:0}.guide-sidebar-links li{margin-bottom:6px}.guide-sidebar-progress{display:flex;align-items:center;gap:12px}.guide-mascot{flex-shrink:0}.guide-mascot svg{display:block}.guide-sidebar-progress-text{font-size:14px;font-weight:600;color:rgb(var(--gray-600))}.dark .guide-sidebar-progress-text{color:rgb(var(--gray-400))}.guide-sidebar-links a{font-size:14px;color:rgb(var(--primary));text-decoration:none}:has(>.guide-header) .guide-sidebar a{border-bottom:none;font-weight:inherit}:has(>.guide-header) a.guide-sidebar-back{color:rgb(var(--gray-500));font-weight:500}:has(>.guide-header) a.guide-sidebar-back:hover{color:rgb(var(--primary))}:has(>.guide-header) .guide-sidebar-links a{color:rgb(var(--primary))}:has(>.guide-header) .guide-sidebar-links a:hover{text-decoration:underline}@media (max-width: 768px){:has(>.guide-header){padding:24px 24px 72px 24px}.guide-sidebar{position:static;width:100%;margin-bottom:24px}.guide-sidebar-content{position:static;display:flex;flex-wrap:wrap;align-items:center;gap:12px}.guide-sidebar-back{width:100%;margin-bottom:4px}.guide-sidebar-section{margin-bottom:0}.guide-sidebar-section:has(.guide-sidebar-progress),.guide-sidebar-section:has(.guide-sidebar-links){display:none}.guide-sidebar-label{display:none}.guide-sidebar-category,.guide-sidebar-date{font-size:12px;padding:4px 10px;border-radius:4px;background-color:#f1f5f9;color:#1e191a}.dark .guide-sidebar-category,.dark .guide-sidebar-date{background-color:rgba(255, 255, 255, 0.03);color:rgb(250, 245, 247)}.guide-header{position:static;box-shadow:none}.guide-sticky-header{padding:12px 16px}.guide-progress-track{margin:-12px -16px 12px}.guide-sticky-title{font-size:1.5rem}}:has(>.guide-header) h1,:has(>.guide-header) h2,:has(>.guide-header) h3{color:rgb(var(--gray-900))}.dark :has(>.guide-header) h1,.dark :has(>.guide-header) h2,.dark :has(>.guide-header) h3{color:rgb(var(--gray-50))}:has(>.guide-header) h1{font-size:2.25rem;font-weight:700;margin:0 0 16px 0;line-height:1.2}:has(>.guide-header) h2{font-size:1.5rem;font-weight:600;margin:32px 0 16px 0;line-height:1.3}:has(>.guide-header) [data-component-part=\"step-title\"]{margin:0 0 16px 0}:has(>.guide-header) h3{font-size:1.25rem;font-weight:600;margin:24px 0 12px 0;line-height:1.4}:has(>.guide-header) p,:has(>.guide-header) [data-as=\"p\"]{display:block;margin:16px 0;line-height:1.7}:has(>.guide-header)>.guide-header+p,:has(>.guide-header)>.guide-header+[data-as=\"p\"]{margin-top:0}:has(>.guide-header) ul:not(.not-prose),:has(>.guide-header) ol:not(.not-prose){margin:16px 0;padding-left:24px}:has(>.guide-header) ul:not(.not-prose){list-style-type:disc}:has(>.guide-header) ol:not(.not-prose){list-style-type:decimal!important}:has(>.guide-header) :not(.not-prose)>li{margin-bottom:8px;line-height:1.6}:has(>.guide-header) .prose ul:not(.not-prose){list-style-type:none;padding-left:0}:has(>.guide-header) .prose :not(.not-prose)>li{margin-bottom:0}:has(>.guide-header) a{color:rgb(17, 24, 39);text-decoration:none;font-weight:600;border-bottom:1px solid rgb(var(--primary))}.dark :has(>.guide-header) a{color:rgb(var(--gray-50))}:has(>.guide-header) a:hover{border-bottom-width:2px}:has(>.guide-header) strong{font-weight:600;color:rgb(var(--gray-900))}.dark :has(>.guide-header) strong{color:rgb(var(--gray-50))}:has(>.guide-header) code{font-size:0.9em}:has(>.guide-header) table{width:100%;border-collapse:collapse;margin:16px 0}:has(>.guide-header) th{text-align:left;font-weight:600;padding:8px 16px 8px 0;border-bottom:1px solid rgb(var(--gray-200));color:rgb(var(--gray-900))}.dark :has(>.guide-header) th{border-bottom-color:rgb(var(--gray-700));color:rgb(var(--gray-50))}:has(>.guide-header) td{padding:12px 16px 12px 0;border-bottom:1px solid rgb(var(--gray-200));vertical-align:top}.dark :has(>.guide-header) td{border-bottom-color:rgb(var(--gray-700))}:has(>.guide-header) img{margin:16px 0;border-radius:8px}:has(>.guide-header) [data-component-part=\"card-title\"]{font-size:1rem!important;margin:4px 0 0 0!important}:has(>.guide-header) [data-component-part=\"card-content\"]{font-size:0.875rem!important;line-height:1.5!important}:has(>.guide-header) [data-component-part=\"card-content\"] [data-as=\"p\"]{font-size:0.875rem!important;margin:4px 0!important;line-height:1.5!important}.guides-container{max-width:1200px;margin:0 auto;padding:48px 24px}.guides-title{font-size:2.5rem;font-weight:700;color:#1e191a;margin-bottom:16px}.dark .guides-title{color:#e6e1e2}.guides-description{font-size:1.125rem;color:#1e191a;margin-bottom:32px}.dark .guides-description{color:#cbd5e1}.guides-layout{display:flex;gap:48px}.guides-sidebar{width:220px;flex-shrink:0}.guides-filters{position:sticky;top:100px;max-height:calc(100vh - 124px);overflow-y:auto;scrollbar-width:thin}.guides-filters::-webkit-scrollbar{width:6px}.guides-filters::-webkit-scrollbar-thumb{background:rgba(128, 128, 128, 0.35);border-radius:3px}.guides-filter-group{margin-bottom:24px}.guides-filter-label{display:block;font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;color:#1e191a;margin-bottom:8px}.dark .guides-filter-label{color:#cbd5e1}.guides-filter-input{width:100%;padding:8px 12px;border-top-left-radius:9999px;border-top-right-radius:9999px;border-bottom-left-radius:9999px;border-bottom-right-radius:9999px;border-color:rgb(230, 225, 226);font-size:14px;box-sizing:border-box;background-color:rgba(17, 12, 14, 0.03);color:rgb(119, 114, 116)}.dark .guides-filter-input{background-color:rgba(255, 255, 255, 0.03);border-color:#334155;color:rgba(255, 255, 255, 0.5)}.guides-filter-input:focus{outline:none;border-color:#FF5FA2}.dark .guides-filter-input::placeholder{color:rgba(255, 255, 255, 0.5)}.guides-filter-button{display:block;width:100%;padding:8px 12px;margin-bottom:4px;border-radius:160px;border:1px solid #e2e8f0;background:transparent;font-size:14px;text-align:left;cursor:pointer;transition:all 0.15s ease;color:#334155}.dark .guides-filter-button{color:#cbd5e1;border-color:rgba(255, 255, 255, 0.1);border-style:solid;border-width:1.5px}.guides-filter-button:hover{background-color:#f8fafc}.dark .guides-filter-button:hover{background-color:#0e0b0e;border-color:#FF5FA2}.guides-filter-button.active{border-color:#FF5FA2;background-color:#fff0f6;color:#FF5FA2}.dark .guides-filter-button.active{background-color:rgba(255, 95, 162, 0.15)}.guides-clear-button{width:100%;padding:10px 12px;margin-bottom:16px;border:1px solid #e2e8f0;border-radius:160px;background:#f8fafc;color:#334155;font-size:14px;font-weight:500;cursor:pointer;transition:all 0.15s ease}.dark .guides-clear-button{background:#0e0b0e;color:#e2e8f0;border-color:rgba(255, 255, 255, 0.1);border-style:solid;border-width:1.5px}.guides-clear-button:hover{background:#f1f5f9;border-color:#cbd5e1}.dark .guides-clear-button:hover{background:#0e0b0e;border-color:#FF5FA2}.guides-content{flex:1;min-width:0}.guides-results-count{font-size:14px;color:#1e191a;margin-bottom:16px}.dark .guides-results-count{color:#cbd5e1}.guides-grid{display:grid;grid-template-columns:repeat(auto-fill, minmax(280px, 1fr));gap:16px}.guides-card{border:1px solid #e2e8f0;border-radius:16px;padding:20px;text-decoration:none;color:inherit;display:flex;flex-direction:column;gap:12px;transition:border-color 0.15s ease, box-shadow 0.15s ease;background-color:#FCFCF7}.dark .guides-card{border-color:rgba(255, 255, 255, 0.1);border-style:solid;border-width:1.5px;background-color:#0e0b0e}.guides-card:hover{border-color:#FF5FA2;box-shadow:0 2px 8px rgba(0, 0, 0, 0.08)}.dark .guides-card:hover{box-shadow:0 2px 8px rgba(0, 0, 0, 0.3)}.guides-card-icon{margin-bottom:4px}.guides-card-title{font-size:16px;font-weight:600;color:#1e191a;margin:0;line-height:1.3}.dark .guides-card-title{color:#FCFCF7}.guides-card-description{font-size:16px;color:#575254;margin:0;line-height:1.5;flex-grow:1}.dark .guides-card-description{color:#a6a1a2}.guides-card-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.guides-card-tag{font-size:12px;padding:2px 8px;border-radius:4px;background-color:#f1f5f9;color:#1e191a}.dark .guides-card-tag{background-color:rgba(255, 255, 255, 0.03);color:rgb(250, 245, 247)}.guides-no-results{text-align:center;padding:48px 24px;color:#1e191a}.dark .guides-no-results{color:#cbd5e1}@media (max-width: 768px){.guides-layout{flex-direction:column;gap:24px}.guides-sidebar{width:100%}.guides-filters{position:static;max-height:none;overflow-y:visible}.guides-filter-button{display:inline-block;width:auto;margin-right:8px}}.badge-color{background-color:#FF5FA2;color:#FCFCF7!important}.lib-page{--lib-muted: #575254;color:#1e191a}.dark .lib-page{--lib-muted: #a6a1a2;color:#e6e1e2}.lib-page a{color:#FF5FA2}.lib-card:hover{border-color:#FF5FA2!important}.lib-panel{background-color:#FCFCF7;color:#1e191a;height:100vh;height:100dvh;max-height:100dvh}.dark .lib-panel{background-color:#0e0b0e;color:#e6e1e2}.lib-logo-chip{display:inline-flex;align-items:center;justify-content:center;flex:none;overflow:hidden}.dark .lib-logo-chip{padding:3px 5px;border-radius:5px;background-color:#ffffff}.lib-logo-chip img{border:0;border-radius:0}.endpoint-table{table-layout:fixed}.endpoint-table th:first-child,.endpoint-table td:first-child{width:18rem;min-width:18rem;max-width:18rem}.endpoint-table th:last-child,.endpoint-table td:last-child{width:8rem;min-width:8rem;max-width:8rem}.icon{border:0px}.icons{background-color:#000000}.dark .icons{background-color:rgb(var(--gray-50))}.icon-position{display:inline;vertical-align:middle}.dbt-health-good{color:#178250}.dbt-health-warning{color:#FFBD14}.dbt-health-failure{color:#E42F2F}.dbt-health-unknown{color:#676F7E}.dark .dbt-health-good{color:#68B691}.dark .dbt-health-warning{color:#FDD97C}.dark .dbt-health-failure{color:#FF9F8A}.dark .dbt-health-unknown{color:#B7BDC8}.dbt-health-mark{color:#676F7E}.dark .dbt-health-mark{color:#B7BDC8}.dbt-health-ring{fill:#FCFCF7}.dark .dbt-health-ring{fill:#0e0b0e}[data-component-part=\"accordion-icon\"] svg{display:block!important}.side-by-side{display:flex;flex-direction:row-reverse;align-items:flex-start;gap:1.5rem;margin:1.5rem 0}.side-by-side-reverse{flex-direction:row}.side-by-side-divider{padding-bottom:1.5rem;border-bottom:1px solid rgb(var(--gray-200))}.dark .side-by-side-divider{border-bottom-color:rgb(var(--gray-700))}.side-by-side-media{flex:0 0 45%;display:flex;flex-direction:column;align-items:center;margin:0}.side-by-side-media img{width:auto;height:auto;max-width:100%;max-height:var(--side-by-side-height, 220px);margin:0}.side-by-side-caption{margin-top:0.75rem;padding:0 2rem 0.5rem;text-align:center;font-size:0.875rem;line-height:1.25rem;color:rgb(var(--gray-700))}.dark .side-by-side-caption{color:rgb(var(--gray-400))}.side-by-side-body{flex:1;min-width:0}.side-by-side-body p,.side-by-side-body [data-as=\"p\"]{display:block;margin:1rem 0}.side-by-side-body .side-by-side-title{margin:0 0 0.5rem;font-weight:600;color:rgb(var(--gray-900))}.dark .side-by-side-body .side-by-side-title{color:rgb(var(--gray-50))}.side-by-side-body>:first-child{margin-top:0}.side-by-side-body>:last-child{margin-bottom:0}@media (max-width: 768px){.side-by-side,.side-by-side-reverse{flex-direction:column;align-items:stretch}.side-by-side-media{flex:1 1 auto}}#page-title,:has(>.guide-header) h1,.guides-title{font-weight:400;line-height:1;letter-spacing:0;text-wrap:pretty}#page-title{font-size:2rem}@media (min-width: 40rem){#page-title{font-size:2.625rem}}h2,h3,h4,h5,h6{font-family:var(--font-family-body-custom)}.mdx-content :is(h2,h3,h4,h5,h6):not([data-component-part]):not(.not-prose){font-weight:500;line-height:1.15;letter-spacing:0;text-wrap:pretty}.mdx-content h2:not([data-component-part]):not(.not-prose){font-size:1.5rem}"}],"page":{"pagePath":"guides/embed/embed-using-js-events","slug":"/guides/embed/embed-using-js-events","pageMetadata":{"title":"Save and restore dashboard filters and controls in embedded apps","description":"Use embed events to capture a user's dashboard filter and control selections, store them, and reapply them later so users can return to the views they've customized.","tags":["embed"],"keywords":["embed events","postMessage","dashboard filters","dashboard controls","filter persistence","embedded dashboards","embedded apps","dashboard:filters","dashboard:controls","dashboard:set-filters","dashboard:set-controls"],"mode":"custom","href":"/guides/embed/embed-using-js-events"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Use embed events to capture a user’s dashboard filter and control selections, store them, and reapply them later so users can return to the views they’ve customized.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];const categoryIcons={\"administration\":`lock`,\"api\":`terminal`,\"connections\":`database`,\"dashboards\":`table-columns`,\"embed\":`code`,\"errors\":`exclamation`,\"migration\":`angles-right`,\"modeling\":`wrench`,\"patterns\":`plus`,\"schedules \u0026 alerts\":`envelope`,\"visualizations\":`chart-column`,\"workbooks\":`book`};const GuideSidebar=({category,relatedLinks,updatedDate})=>{const _components={a:`a`,..._provideComponents()},{Icon}=_components;if(!Icon)_missingMdxReference(`Icon`,true);const[progress,setProgress]=React.useState(0);React.useEffect(()=>{const handleScroll=()=>{const scrollTop=window.scrollY;const docHeight=document.documentElement.scrollHeight-window.innerHeight;const scrollPercent=docHeight>0?scrollTop/docHeight*100:0;setProgress(Math.min(100,Math.max(0,scrollPercent)))};window.addEventListener(`scroll`,handleScroll,{passive:true});handleScroll();return()=>window.removeEventListener(`scroll`,handleScroll)},[]);const icon=category?categoryIcons[category.toLowerCase()]||`book`:`book`;return _jsx(`aside`,{className:`guide-sidebar`,children:_jsxs(`div`,{className:`guide-sidebar-content`,children:[_jsxs(_components.a,{href:`/guides`,className:`guide-sidebar-back`,children:[_jsx(Icon,{icon:`arrow-left`,iconType:`solid`,size:14}),_jsx(`span`,{children:`All guides`})]}),_jsxs(`div`,{className:`guide-sidebar-section`,children:[_jsx(`div`,{className:`guide-sidebar-label`,children:`Progress`}),_jsxs(`div`,{className:`guide-sidebar-progress`,children:[_jsx(`div`,{className:`guide-mascot`,children:_jsxs(`svg`,{viewBox:`0 0 688 690`,width:`48`,height:`48`,children:[_jsx(`defs`,{children:_jsx(`clipPath`,{id:`progressClip`,children:_jsx(`rect`,{x:`0`,y:0,width:`688`,height:progress*6.9})})}),_jsx(`path`,{d:`M343.67 1.5C542.684 1.5 685.84 149.351 685.84 344.84C685.84 540.328 542.685 688.18 343.67 688.18C144.655 688.18 1.5 540.318 1.5 344.84C1.50007 149.361 144.655 1.50005 343.67 1.5Z`,fill:`#FCFCF7`,stroke:`#FF5FA2`,strokeWidth:`3`}),_jsx(`path`,{d:`M343.67 0C143.81 0 0 148.55 0 344.84C0 541.13 143.81 689.68 343.67 689.68C543.53 689.68 687.34 541.14 687.34 344.84C687.34 148.54 543.53 0 343.67 0Z`,fill:`#FF5FA2`,clipPath:`url(#progressClip)`}),_jsx(`path`,{d:`M337.89 319.29C337.89 336.75 322.49 350.14 302.81 349.83C286.18 349.57 273.89 337.29 274.37 321.45C274.88 304.82 290.91 290.88 309.98 290.44C325.69 290.09 337.88 302.69 337.88 319.29H337.89Z`,fill:`#4D122C`}),_jsx(`path`,{d:`M566.17 319.29C566.17 336.75 550.77 350.14 531.09 349.83C514.46 349.57 502.17 337.29 502.65 321.45C503.16 304.82 519.19 290.88 538.26 290.44C553.97 290.09 566.16 302.69 566.16 319.29H566.17Z`,fill:`#4D122C`}),_jsx(`path`,{d:`M367.74 342.07C360.22 346.32 359.4 354.9 370.62 366.4C381.85 377.9 399.76 389.56 420.81 389.18C441.88 389.1 460.67 377.72 472.47 363.53C473.83 361.93 478.84 356.88 478.51 351.07C478.32 348.35 476.17 341.19 467.83 341.38C463.46 341.44 461.21 343.68 456.69 347.36C445.2 356.14 432.7 361.21 420.56 361.27C408.43 361.43 395.68 356.17 385.39 347.22C380.32 342.81 375.25 337.82 367.74 342.07Z`,fill:`#4D122C`})]})}),_jsxs(`span`,{className:`guide-sidebar-progress-text`,children:[Math.round(progress),`%`]})]})]}),category\u0026\u0026_jsxs(`div`,{className:`guide-sidebar-section`,children:[_jsx(`div`,{className:`guide-sidebar-label`,children:`Category`}),_jsxs(`div`,{className:`guide-sidebar-category`,children:[_jsx(Icon,{icon,iconType:`solid`,size:14}),_jsx(`span`,{children:category})]})]}),updatedDate\u0026\u0026_jsxs(`div`,{className:`guide-sidebar-section`,children:[_jsx(`div`,{className:`guide-sidebar-label`,children:`Last updated`}),_jsx(`div`,{className:`guide-sidebar-date`,children:updatedDate})]}),relatedLinks\u0026\u0026relatedLinks.length>0\u0026\u0026_jsxs(`div`,{className:`guide-sidebar-section`,children:[_jsx(`div`,{className:`guide-sidebar-label`,children:`Related`}),_jsx(`ul`,{className:`guide-sidebar-links`,children:relatedLinks.map((link,index)=>_jsx(`li`,{children:_jsx(_components.a,{href:link.href,children:link.title})},index))})]})]})})};const GuideTitle=({title})=>{return _jsx(`div`,{className:`guide-header`,children:_jsx(`h1`,{className:`guide-title`,children:title})})};function _createMdxContent(props){const _components={a:`a`,code:`code`,h2:`h2`,h3:`h3`,li:`li`,p:`p`,pre:`pre`,span:`span`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Note,Tip,Warning,_MdxComponentBoundary}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);if(!_MdxComponentBoundary)_missingMdxReference(`_MdxComponentBoundary`,true);return _jsxs(_Fragment,{children:[_jsx(_MdxComponentBoundary,{name:`GuideSidebar`,children:_jsx(GuideSidebar,{categoryIcons,category:`embed`,updatedDate:`November 2026`,relatedLinks:[{title:`Embed events`,href:`/embed/events`},{title:`Consuming embed events sent by Omni`,href:`/embed/events/consume`},{title:`Sending embed events to Omni`,href:`/embed/events/send`},{title:`page:ready embed event`,href:`/embed/events/page-ready`},{title:`dashboard:ready embed event`,href:`/embed/events/dashboard-ready`},{title:`dashboard:filters embed event`,href:`/embed/events/dashboard-filters`},{title:`dashboard:filter-changed embed event`,href:`/embed/events/dashboard-filter-changed`},{title:`dashboard:set-filters embed event`,href:`/embed/events/dashboard-set-filters`},{title:`dashboard:controls embed event`,href:`/embed/events/dashboard-controls`},{title:`dashboard:control-changed embed event`,href:`/embed/events/dashboard-control-changed`},{title:`dashboard:set-controls embed event`,href:`/embed/events/dashboard-set-controls`},{title:`app:filter-changed embed event`,href:`/embed/events/app-filter-changed`},{title:`app:event embed event`,href:`/embed/events/app-event`},{title:`Setting up custom domains for embed`,href:`/embed/customization/vanity-domains`},{title:`filterSearchParam`,href:`/embed/setup/url-parameters/filterSearchParam`}]})}),`\n`,_jsx(_MdxComponentBoundary,{name:`GuideTitle`,children:_jsx(GuideTitle,{title:`Save and restore dashboard filters and controls in embedded apps`})}),`\n`,_jsx(_components.p,{children:`Users who filter or configure an embedded dashboard lose that view the moment they navigate away or close the tab. This guide walks through capturing a user’s filter and control selections with embed events, storing them outside the dashboard, and reapplying them later, so users can build a set of views they return to without redoing that work every time. It also covers what’s possible, and what isn’t, for embedded apps.`}),`\n`,_jsx(_components.p,{children:`This is especially relevant if:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`You embed dashboards in your application and want users to save and switch between multiple configured views of the same dashboard`}),`\n`,_jsx(_components.li,{children:`You want those preferences to persist across browser sessions or devices, not just within a single page load`}),`\n`,_jsx(_components.li,{children:`You’re building save, rename, duplicate, or delete controls for saved views around an embedded dashboard or app`}),`\n`]}),`\n`,_jsx(_components.h2,{children:`How persistence works`}),`\n`,_jsx(_components.p,{children:`The pattern has two halves: your application listens for state events coming out of the dashboard, and your application sends that state back into the dashboard on demand. Between those two steps, you decide where saved configurations live and how they’re matched back up with what’s currently on screen.`}),`\n`,_jsx(_components.p,{children:`Dashboards have two kinds of state worth saving, and Omni treats them as separate systems with separate events: filters a viewer sets, and controls (field switchers, timeframe pickers, top N selectors, and similar) built into the dashboard itself.`}),`\n`,_jsx(_components.h3,{children:`The embed events involved`}),`\n`,_jsxs(_components.p,{children:[`For filters, the dashboard emits `,_jsx(_components.code,{children:`dashboard:filters`}),` with the full current filter state whenever a user applies one. Your application sends `,_jsx(_components.code,{children:`dashboard:set-filters`}),` into the dashboard’s iframe to apply a saved configuration; only the filters included in that payload change, and any filters left out keep their existing values.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`dashboard:set-filters`}),` and the older `,_jsx(_components.code,{children:`dashboard:filter-change-by-url-parameter`}),` are synonyms — they take the same payload and Omni handles them the same way. Use `,_jsx(_components.code,{children:`dashboard:set-filters`}),` in new code.`]})}),`\n`,_jsxs(_components.p,{children:[`Controls work the same way, with their own pair of events: `,_jsx(_components.code,{children:`dashboard:controls`}),` reports every control’s current state, and `,_jsx(_components.code,{children:`dashboard:set-controls`}),` applies saved control values back onto the dashboard.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`dashboard:filter-changed`}),` and `,_jsx(_components.code,{children:`dashboard:control-changed`}),` are also available if you only need to react to what just changed (for example, to log which filter or control a user just touched) rather than the full state every time.`]})}),`\n`,_jsx(_components.h3,{children:`Where configurations get stored`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`localStorage`}),` is the fastest way to get this working, and it’s fine for a single-user, single-device scenario. For anything a user should be able to reach from another device, or that your team needs to manage, store configurations in your own backend instead, keyed to the user and the dashboard.`]}),`\n`,_jsx(_components.h2,{children:`Set up two-way messaging`}),`\n`,_jsxs(_components.p,{children:[`Both directions use the browser’s `,_jsx(_components.code,{children:`postMessage`}),` API, so you need a listener for events coming from Omni and a way to post events into the dashboard’s iframe.`]}),`\n`,_jsx(_components.h3,{children:`Wait for the right readiness event`}),`\n`,_jsxs(_components.p,{children:[`Before sending anything into the iframe, wait for Omni to say it’s listening. `,_jsx(_components.code,{children:`page:ready`}),` fires once the embedded page can receive events at all; `,_jsx(_components.code,{children:`dashboard:ready`}),` fires every time a dashboard finishes loading, including after in-app navigation, and is the event to key off if you want to reapply a saved view each time a dashboard loads.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`14`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`14`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`useEffect`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` listener`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`event`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` MessageEvent`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`origin`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://your-org.embed-omniapp.co\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`?.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"dashboard:ready\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`dashboardId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`payload`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` applySavedViewIfAny`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`dashboardId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` };`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Add the listener before the iframe starts to load`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` window`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`addEventListener`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`listener`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` () `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` window`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`removeEventListener`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`listener`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}, []);`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Omni queues `,_jsx(_components.code,{children:`dashboard:set-filters`}),` and `,_jsx(_components.code,{children:`dashboard:set-controls`}),` events sent before the dashboard is ready and applies them once it is, so sending slightly early isn’t harmful, but waiting for `,_jsx(_components.code,{children:`dashboard:ready`}),` is the documented way to avoid racing the dashboard’s own initial-filter event and avoids guessing at a load-complete signal.`]}),`\n`,_jsx(_components.h3,{children:`Listen for filter and control changes`}),`\n`,_jsxs(_components.p,{children:[`Add a `,_jsx(_components.code,{children:`message`}),` listener on the parent window and filter for events from your Omni embed domain:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`17`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`17`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`useEffect`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` listener`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`event`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` MessageEvent`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Only accept messages from your known embed origin`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`origin`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://your-org.embed-omniapp.co\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`?.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"dashboard:filters\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` setCurrentFilters`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`payload`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`?.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"dashboard:controls\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` setCurrentControls`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`payload`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` };`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` window`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`addEventListener`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`listener`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` () `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` window`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`removeEventListener`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`listener`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}, []);`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Check `,_jsx(_components.code,{children:`event.origin`}),` against your exact embed domain (or vanity domain, if you’ve set one up) rather than a substring match, so a page on an unrelated domain that happens to contain your domain name as a substring can’t get its messages processed.`]}),`\n`,_jsx(_components.h3,{children:`Send filters and controls back to the dashboard`}),`\n`,_jsxs(_components.p,{children:[`Each filter in a `,_jsx(_components.code,{children:`dashboard:filters`}),` payload includes an `,_jsx(_components.code,{children:`asJsonUrlSearchParam`}),` value; each control in a `,_jsx(_components.code,{children:`dashboard:controls`}),` payload includes an `,_jsx(_components.code,{children:`asUrlSearchParam`}),` value (which can be `,_jsx(_components.code,{children:`null`}),` — skip those rather than joining them). Join the ones you want to restore and send them as `,_jsx(_components.code,{children:`dashboard:set-filters`}),` and `,_jsx(_components.code,{children:`dashboard:set-controls`}),` events:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`26`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`26`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` applyConfig`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`config`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` SavedView`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` filterUrlParameter`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Object`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`values`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`config`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`filters`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ??`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {})`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`map`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`((`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`filter`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` any`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` filter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`asJsonUrlSearchParam`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`filter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Boolean`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`join`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\u0026\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` controlUrlParameters`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Object`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`values`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`config`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`controls`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ??`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {})`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`map`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`((`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`control`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` any`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` control`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`asUrlSearchParam`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`filter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`((`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`param`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` param`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` is`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` =>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` param`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !==`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` omniOrigin`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://your-org.embed-omniapp.co\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`filterUrlParameter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` iframeRef`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`current`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`?.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`contentWindow`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`?.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`postMessage`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`name:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"dashboard:set-filters\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`payload:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`filterUrlParameter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } },`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` omniOrigin`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` );`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`controlUrlParameters`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:`length`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` >`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` iframeRef`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`current`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`?.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`contentWindow`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`?.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`postMessage`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`name:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"dashboard:set-controls\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`payload:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`controlUrlParameters`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } },`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` omniOrigin`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` );`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`};`})}),`\n`]})})}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Use your actual embed origin as the target in `,_jsx(_components.code,{children:`postMessage`}),`, not a wildcard (`,_jsx(_components.code,{children:`*`}),`). A wildcard target sends the message to whatever origin the iframe happens to be pointed at, including one an attacker redirected it to.`]})}),`\n`,_jsxs(_components.p,{children:[`A child control that follows a parent control reports a `,_jsx(_components.code,{children:`null`}),` `,_jsx(_components.code,{children:`asUrlSearchParam`}),` on purpose — the parent’s own parameter reproduces it. Sending an explicit value for that child would win over the parent on replay and stop it from following later parent changes, so leaving it out (which the `,_jsx(_components.code,{children:`filter(Boolean)`}),` above already does) is correct, not an oversight.`]}),`\n`,_jsx(_components.h2,{children:`Handle timing and normalization issues`}),`\n`,_jsx(_components.p,{children:`Two dashboards with the same filters and controls applied don’t always produce identical payloads, so comparing saved state against current state takes a bit of care.`}),`\n`,_jsx(_components.h3,{children:`Filter out inactive and display-only fields`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`dashboard:filters`}),` includes every filter defined on the dashboard, not just the ones a user has actually set, and `,_jsx(_components.code,{children:`dashboard:controls`}),` likewise lists every control, including ones with no URL value. Presence in either payload doesn’t mean something is active, so check values before treating an entry as part of the user’s configuration: for list filters, check that `,_jsx(_components.code,{children:`values`}),` has at least one entry; for date ranges, check that the range bounds are non-null; for controls, check `,_jsx(_components.code,{children:`value`}),` rather than assuming the key means anything.`]}),`\n`,_jsxs(_components.p,{children:[`The payload can also include display-only properties, such as `,_jsx(_components.code,{children:`appliedLabels`}),` on a filter, that vary between otherwise-identical states. Strip these before comparing two configurations or storing one.`]}),`\n`,_jsx(_components.h3,{children:`Compare state reliably`}),`\n`,_jsx(_components.p,{children:`If you want to detect whether a user’s current filters match a saved configuration, don’t compare the raw strings. Parse each filter’s JSON, remove display-only keys, sort the remaining keys, and re-serialize before comparing:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` DISPLAY_ONLY_KEYS`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Set`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`([`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"appliedLabels\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` canonicalize`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`value`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` unknown`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`value`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u0026\u0026`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` typeof`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` value`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"object\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` keys`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Object`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`keys`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`filter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`((`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`key`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`DISPLAY_ONLY_KEYS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`has`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`key`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`))`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`sort`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `{\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`keys`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`map`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`((`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:`k`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`JSON`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`k`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`canonicalize`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`((`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`value`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` as`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` any`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`)[`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`k`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`])`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`join`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\",\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"}`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.h2,{children:`Manage saved configurations`}),`\n`,_jsx(_components.p,{children:`Once capture and restore are working, the rest is standard CRUD against whatever store you chose.`}),`\n`,_jsx(_components.h3,{children:`Update, rename, and duplicate`}),`\n`,_jsx(_components.p,{children:`Update a configuration by replacing its stored filters and controls with the current state; rename or duplicate it by copying the record and changing its name or ID. None of these operations touch the dashboard directly, they only change what you have saved.`}),`\n`,_jsx(_components.h3,{children:`Isolate configurations by user and dashboard`}),`\n`,_jsx(_components.p,{children:`Filter and control specifications are specific to the dashboard they came from and won’t produce the intended result if applied to a different one, so key your stored configurations by dashboard ID as well as by user. If configurations are stored client-side, clear them when a user switches dashboards or accounts; if they’re stored on your backend, scope queries to the current user and organization.`}),`\n`,_jsx(_components.h2,{children:`Embedded apps`}),`\n`,_jsxs(_components.p,{children:[`Apps follow a different model, and the dashboard pattern above doesn’t carry over directly. An `,_jsx(_components.a,{href:`/visualize-present/apps`,children:`app`}),` manages its own query filters internally through `,_jsx(_components.code,{children:`omni.query(name).setFilter()`}),` and `,_jsx(_components.code,{children:`.removeFilter()`}),` calls in the app’s own code, and Omni doesn’t currently expose an inbound embed event that lets your page set those filters from outside.`]}),`\n`,_jsx(_components.p,{children:`What you can do from your embedding page is observe what’s happening inside the app and react to it:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`16`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`16`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`window`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`addEventListener`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`origin`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://your-org.embed-omniapp.co\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`?.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"app:filter-changed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`filters`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`changed`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`payload`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` saveAppFilterState`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`filters`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"App filter changed:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`changed`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`?.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"app:event\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`payload`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`payload`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"account-selected\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` showAccountDetail`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`payload`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`accountId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`app:filter-changed`}),` reports the app’s complete filter overrides after each change, keyed by query name and field, plus a `,_jsx(_components.code,{children:`changed`}),` array describing just what’s different. `,_jsx(_components.code,{children:`app:event`}),` carries whatever an app’s own code chooses to emit with `,_jsx(_components.code,{children:`omni.emit(name, payload)`}),`, which is useful if the app you’re embedding was built to broadcast its own selections (a row click, a view toggle) rather than only its query filters.`]}),`\n`,_jsxs(_components.p,{children:[`To actually restore a saved state inside an app, the restoration logic has to live in the app’s own code, reading from wherever the app persists its state (an Omni user attribute, a call to your backend, or `,_jsx(_components.code,{children:`omni`}),` SDK storage inside the app) and calling `,_jsx(_components.code,{children:`setFilter()`}),` itself on load. Your embedding page can supply a user attribute, a signed parameter, or data through `,_jsx(_components.code,{children:`app:event`}),` for the app to consume, but it can’t force a filter into the app the way `,_jsx(_components.code,{children:`dashboard:set-filters`}),` forces one into a dashboard.`]}),`\n`,_jsx(_components.h2,{children:`Known limitations`}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Omni’s embed events don’t support clearing all filters or controls on a dashboard programmatically. Sending an empty `,_jsx(_components.code,{children:`filterUrlParameter`}),` or an empty `,_jsx(_components.code,{children:`controlUrlParameters`}),` array won’t reset the dashboard to its unfiltered, default-control state.`]})}),`\n`,_jsxs(_components.p,{children:[`Work around this by giving users a saved “default” configuration with no filters or non-default controls applied, or by remounting the dashboard iframe (for example, by changing its `,_jsx(_components.code,{children:`key`}),` or re-signing its URL) to force it back to its initial state. Remounting loses the user’s scroll position, but it’s the most reliable way to get a clean slate.`]}),`\n`,_jsx(_components.h2,{children:`Next steps`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Read the `,_jsx(_components.a,{href:`/embed/events`,children:`embed events overview`}),` for the full list of events Omni can send and receive`]}),`\n`,_jsxs(_components.li,{children:[`Set up a `,_jsx(_components.a,{href:`/embed/customization/vanity-domains`,children:`vanity domain`}),` if you haven’t already, so your application and the embedded dashboard share a top-level domain`]}),`\n`,_jsxs(_components.li,{children:[`Reference `,_jsx(_components.a,{href:`/embed/setup/url-parameters/filterSearchParam`,children:`filterSearchParam`}),` if you’d rather set a user’s initial filters at login instead of after the dashboard has loaded`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{categoryIcons,GuideSidebar,GuideTitle,default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Save and restore dashboard filters and controls in embedded apps","description":"Use embed events to capture a user's dashboard filter and control selections, store them, and reapply them later so users can return to the views they've customized.","tags":["embed"],"keywords":["embed events","postMessage","dashboard filters","dashboard controls","filter persistence","embedded dashboards","embedded apps","dashboard:filters","dashboard:controls","dashboard:set-filters","dashboard:set-controls"],"mode":"custom","href":"/guides/embed/embed-using-js-events"}}},"mdxSourceWithNoJs":null,"noJsSplices":[[148,4088,"undefined;const GuideSidebar=()=>null;co"]]},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"subdomain":"omni-e7402367","siteName":"Omni Docs","title":"Save and restore dashboard filters and controls in embedded apps - Omni Docs","relatedPagesConfig":{"enabled":true,"limit":3,"mode":"manual"},"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-18T17:53:45.454Z","originalFileLocation":"guides/embed/embed-using-js-events.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Use embed events to capture a user\u0026#x27;s dashboard filter and control selections, store them, and reapply them later so users can return to the views they\u0026#x27;ve customized.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Omni Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/omni-e7402367/Hcd24pRrgU0Go9sj/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/omni-e7402367/Hcd24pRrgU0Go9sj/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/omni-e7402367/Hcd24pRrgU0Go9sj/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/omni-e7402367/Hcd24pRrgU0Go9sj/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/omni-e7402367/Hcd24pRrgU0Go9sj/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/omni-e7402367/Hcd24pRrgU0Go9sj/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/omni-e7402367/Hcd24pRrgU0Go9sj/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/omni-e7402367/Hcd24pRrgU0Go9sj/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/omni-e7402367/Hcd24pRrgU0Go9sj/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Save and restore dashboard filters and controls in embedded apps - Omni Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Use embed events to capture a user\u0026#x27;s dashboard filter and control selections, store them, and reapply them later so users can return to the views they\u0026#x27;ve customized.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Omni Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.omni.co/guides/embed/embed-using-js-events\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://omni-e7402367.mintlify.site/_mintlify/api/og/v2?division=Documentation\u0026amp;title=Save+and+restore+dashboard+filters+and+controls+in+embedded+apps\u0026amp;description=Use+embed+events+to+capture+a+user%27s+dashboard+filter+and+control+selections%2C+store+them%2C+and+reapply+them+later+so+users+can+return+to+the+views+they%27ve+custom\u0026amp;theme=f0d77b05d3972e3534869d72\u0026amp;signature=9910c415b2ca97a8af1df8f933caaace2b2327ee3f515d77eae0a57c0b2093e7\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Save and restore dashboard filters and controls in embedded apps - Omni Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Use embed events to capture a user\u0026#x27;s dashboard filter and control selections, store them, and reapply them later so users can return to the views they\u0026#x27;ve customized.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://omni-e7402367.mintlify.site/_mintlify/api/og/v2?division=Documentation\u0026amp;title=Save+and+restore+dashboard+filters+and+controls+in+embedded+apps\u0026amp;description=Use+embed+events+to+capture+a+user%27s+dashboard+filter+and+control+selections%2C+store+them%2C+and+reapply+them+later+so+users+can+return+to+the+views+they%27ve+custom\u0026amp;theme=f0d77b05d3972e3534869d72\u0026amp;signature=9910c415b2ca97a8af1df8f933caaace2b2327ee3f515d77eae0a57c0b2093e7\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/omni-e7402367/Hcd24pRrgU0Go9sj/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Omni Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#FF5FA2\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.omni.co/guides/embed/embed-using-js-events\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/guides/embed/embed-using-js-events.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.omni.co/#organization\",\"name\":\"Omni Docs\",\"url\":\"https://docs.omni.co\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/omni-e7402367/m1fg0tfdkEcnYhky/images/logo/omni-black.png?fit=max\u0026auto=format\u0026n=m1fg0tfdkEcnYhky\u0026q=85\u0026s=85b81b605382b15b60eb75159899002a\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.omni.co#website\",\"name\":\"Omni Docs\",\"url\":\"https://docs.omni.co\",\"publisher\":{\"@id\":\"https://docs.omni.co/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.omni.co/guides/embed/embed-using-js-events#webpage\",\"url\":\"https://docs.omni.co/guides/embed/embed-using-js-events\",\"name\":\"Save and restore dashboard filters and controls in embedded apps\",\"description\":\"Use embed events to capture a user's dashboard filter and control selections, store them, and reapply them later so users can return to the views they've customized.\",\"dateModified\":\"2026-11-18T17:53:45.454Z\",\"isPartOf\":{\"@id\":\"https://docs.omni.co#website\"}},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.omni.co/guides/embed/embed-using-js-events#article\",\"headline\":\"Save and restore dashboard filters and controls in embedded apps\",\"name\":\"Save and restore dashboard filters and controls in embedded apps\",\"description\":\"Use embed events to capture a user's dashboard filter and control selections, store them, and reapply them later so users can return to the views they've customized.\",\"url\":\"https://docs.omni.co/guides/embed/embed-using-js-events\",\"mainEntityOfPage\":{\"@id\":\"https://docs.omni.co/guides/embed/embed-using-js-events#webpage\"},\"dateModified\":\"2026-11-18T17:53:45.454Z\",\"keywords\":\"embed events, postMessage, dashboard filters, dashboard controls, filter persistence, embedded dashboards, embedded apps, dashboard:filters, dashboard:controls, dashboard:set-filters, dashboard:set-controls\",\"publisher\":{\"@id\":\"https://docs.omni.co/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.omni.co#website\"}}]}\u003c/script>","agentPointerHref":"/guides/embed/embed-using-js-events.md","siteName":"Omni Docs","nav":{"global":null,"tabs":[{"tab":"Docs","pages":[{"title":"Docs","href":""}]},{"tab":"Admin","pages":[{"title":"Admin","href":"/administration"}]},{"tab":"Guides","pages":[{"title":"Guides","mode":"custom","href":"/guides"},{"title":"Gate content creation with ai_context","mode":"custom","href":"/guides/ai/gate-ai-content-creation"},{"title":"Improving AI answer quality","mode":"custom","href":"/guides/ai/improve-ai-answer-quality"},{"title":"Tuning Omni AI for cost and quality","mode":"custom","href":"/guides/ai/tuning-cost-quality"},{"title":"Bulk update model YAML files with the API","mode":"custom","href":"/guides/api/bulk-update-model-yaml"},{"title":"Set up connection environments with the API","mode":"custom","href":"/guides/api/connection-environments"},{"title":"Build a data lineage integration with the Omni API","mode":"custom","href":"/guides/api/data-lineage-integration"},{"title":"Port SQL queries into an Omni workbook via API","mode":"custom","href":"/guides/api/port-sql-queries-omni-api"},{"title":"Rotate Git SSH deploy keys with the API","mode":"custom","href":"/guides/api/rotate-ssh-deploy-keys"},{"title":"Run document queries with the Query API","mode":"custom","href":"/guides/api/run-document-queries"},{"title":"Enforce database RBAC in Omni with connection environments","mode":"custom","href":"/guides/connections/enforce-database-rbac"},{"title":"Filter dashboard charts with calculated fields","mode":"custom","href":"/guides/dashboards/calculated-field-filter"},{"title":"Dashboard best practices","mode":"custom","href":"/guides/dashboards/dashboarding-best-practices"},{"title":"Embed dbt platform data health tiles in Omni dashboards and apps","mode":"custom","href":"/guides/dashboards/dbt-data-health-tiles"},{"title":"Migrate a dashboards to a new connection","mode":"custom","href":"/guides/dashboards/migrate-dashboards"},{"title":"Swap dashboard identifiers","mode":"custom","href":"/guides/dashboards/swap-dashboard-identifiers"},{"title":"Choosing your deployment","mode":"custom","href":"/guides/deployment/choosing-your-deployment"},{"title":"Deploying Omni: Multiple instances across multiple regions","mode":"custom","href":"/guides/deployment/multi-instance-multi-region"},{"title":"Deploying Omni: Multiple instances (Prod/Stage)","mode":"custom","href":"/guides/deployment/multi-instance-prod-stage"},{"title":"Deploying Omni at scale with shared model extensions","mode":"custom","href":"/guides/deployment/scaled-deployments-shared-model-extensions"},{"title":"Deploying Omni: Single instance with dynamic connections","href":"/guides/deployment/single-instance-dynamic-connections"},{"title":"Deploying Omni: Single instance deployment with git and dbt","mode":"custom","href":"/guides/deployment/single-instance-git-dbt"},{"title":"Connect a chat agent to Omni AI for embed experiences","mode":"custom","href":"/guides/embed/ai-chat-agent"},{"title":"Designing a fully bespoke embed experience","mode":"custom","href":"/guides/embed/customizing-embed-experience"},{"title":"Choosing your embed configuration","mode":"custom","href":"/guides/embed/embed-configuration-scenarios"},{"title":"Embed environment architecture","description":"How to structure staging and production Omni instances for external embed, including the CI/CD workflow, content promotion, and permission guardrails.","mode":"custom","href":"/guides/embed/embed-development-production-setup"},{"title":"Save and restore dashboard filters and controls in embedded apps","mode":"custom","href":"/guides/embed/embed-using-js-events"},{"title":"Embedding Omni into internal applications","description":"Embed Omni into internal apps such as wikis, Salesforce, Notion, or any other website that supports iframes.","mode":"custom","href":"/guides/embed/omni-in-internal-app"},{"title":"Embedding Omni in your Notion instance","mode":"custom","href":"/guides/embed/omni-in-notion"},{"title":"Embedding Omni in your Salesforce instance","mode":"custom","href":"/guides/embed/omni-in-salesforce"},{"title":"Triage 'Failed to fetch' browser errors","mode":"custom","href":"/guides/errors/failed-to-fetch"},{"title":"Resolve 'Join fans out data without primary key' errors","mode":"custom","href":"/guides/errors/fan-out-without-pk"},{"title":"Find and fix missing or quarantined Omni emails","mode":"custom","href":"/guides/errors/missing-omni-emails"},{"title":"Migrating Looker dashboards to Omni","mode":"custom","href":"/guides/migrations/looker-to-omni-skill"},{"title":"Set up a custom calendar","mode":"custom","href":"/guides/modeling/custom-calendars"},{"title":"Improving date flexibility with templated filters","mode":"custom","href":"/guides/modeling/date-flexibility-templated-filters"},{"title":"Customizing filter suggestions","mode":"custom","href":"/guides/modeling/filter-suggestions"},{"title":"Count GA4 events exactly, including today","mode":"custom","href":"/guides/modeling/ga4-exact-counts-with-intraday"},{"title":"Join to the same table twice","mode":"custom","href":"/guides/modeling/join-to-same-table"},{"title":"Local development with the model editor CLI","mode":"custom","href":"/guides/modeling/local-development"},{"title":"Organize fields with nested groups","mode":"custom","href":"/guides/modeling/nested-field-groups"},{"title":"Preview dbt changes in Omni before merging to production","mode":"custom","href":"/guides/modeling/preview-dbt-changes"},{"title":"Push Omni topics to Databricks as metric views","mode":"custom","href":"/guides/modeling/push-to-databricks-metric-views"},{"title":"Safely rename a git-connected shared model","mode":"custom","href":"/guides/modeling/rename-git-connected-shared-model"},{"title":"Apply a filter to a single measure","mode":"custom","href":"/guides/modeling/single-field-filter"},{"title":"Using Level of Detail functions for cohorting analysis","mode":"custom","href":"/guides/patterns/build-cohort-analysis-using-level-of-detail"},{"title":"Using AI to build a cohort analysis with month offset","mode":"custom","href":"/guides/patterns/cohort-analysis-month-offset-ai"},{"title":"Building a dynamic pivot query view","mode":"custom","href":"/guides/patterns/dynamic-pivot-query-view"},{"title":"Choosing between LOD fields, window functions, CTEs, and Excel","mode":"custom","href":"/guides/patterns/level-of-detail-build-comparison"},{"title":"Report opening and closing balances from a ledger","mode":"custom","href":"/guides/patterns/opening-closing-balances"},{"title":"Optimizing AI context for fintech and banking","mode":"custom","href":"/guides/patterns/optimizing-ai-context-for-fintech"},{"title":"Optimizing AI context for retail and ecommerce","mode":"custom","href":"/guides/patterns/optimizing-ai-context-for-retail-and-ecommerce"},{"title":"Optimizing AI context for SaaS and sales operations","mode":"custom","href":"/guides/patterns/optimizing-ai-context-for-saas-and-sales-operations"},{"title":"Optimizing AI context for support operations","mode":"custom","href":"/guides/patterns/optimizing-ai-context-for-support-operations"},{"title":"Optimizing AI context for Media and AdTech","mode":"custom","href":"/guides/patterns/optimizing-ai-context-media-and-adtech"},{"title":"Use public images in Omni content and AI branding","mode":"custom","href":"/guides/patterns/public-image-urls"},{"title":"Building a basic cohort analysis with pivots","mode":"custom","href":"/guides/patterns/simple-cohort-analysis-pivot"},{"title":"Cohort analysis using a thin spine","mode":"custom","href":"/guides/patterns/spine-cohort-analysis"},{"title":"Thin dimensional spine for multi-fact event analysis","mode":"custom","href":"/guides/patterns/thin-dimension-spine"},{"title":"Add links to visualizations","mode":"custom","href":"/guides/visualizations/add-links"},{"title":"Combine GeoJSON files with AI to build custom region maps","mode":"custom","href":"/guides/visualizations/combine-geojson-files-with-ai"},{"title":"Customize drill fields","mode":"custom","href":"/guides/workbooks/custom-drill-fields"},{"title":"Build a forecast input app that writes to your data warehouse","mode":"custom","href":"/guides/workbooks/forecast-input-app"},{"title":"Point-in-time snapshots with parameters","mode":"custom","href":"/guides/workbooks/snapshots-with-parameters"}]},{"tab":"Library","pages":[{"title":"Library","href":"/library"}]},{"tab":"Developers","menu":[{"item":"REST APIs","icon":"cloud","description":"Programmatically interact with Omni","pages":[{"title":"REST APIs","href":"/api"}]},{"item":"Embedding","icon":"chart-column","description":"Embed Omni's analytics \u0026 AI in apps","pages":[{"title":"Embedding","href":"/embed"}]},{"item":"CLI","icon":"terminal","description":"Interact with Omni APIs from the terminal","pages":[{"title":"CLI","href":"/developers/cli"}]},{"item":"Agent skills","icon":"robot","description":"Bring Omni workflows into your agent environment","pages":[{"title":"Agent skills","href":"/developers/agent-skills"}]}],"pages":[{"title":"Developers","href":"/api"}]},{"tab":"Product updates","menu":[{"item":"Demos","icon":"rocket","description":"Weekly updates of upcoming and experimental features","pages":[{"title":"Demos","href":"/demos"}]},{"item":"Changelog","icon":"file-lines","description":"New features, improvements, and bug fixes","pages":[{"title":"Changelog","href":"/changelog"}]}],"pages":[{"title":"Product updates","href":"/demos"}]}]},"basePath":"","title":"Save and restore dashboard filters and controls in embedded apps - Omni Docs","deploymentId":"dpl_HhUetB7eHHDAmK9T1Teip38TgFx9","buildId":"dpl_HhUetB7eHHDAmK9T1Teip38TgFx9","dynamics":["10e4515597"],"chunks":["BannerMarkdown-BjdIPj1P.js","dist-C5gjFYHe.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","katex-YMM-FMeD.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}