Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(inbound-filters): Add UI toggle for ChunkLoadError inbound filter #57278

Merged
merged 10 commits into from
Oct 4, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,33 @@ export function ProjectFiltersSettings({project, params, features}: Props) {
/>
</NestedForm>
</PanelItem>
<PanelItem noPadding>
<NestedForm
apiMethod="PUT"
apiEndpoint={projectEndpoint}
initialData={{
'filters:chunk-load-error':
project.options?.['filters:chunk-load-error'],
}}
saveOnBlur
onSubmitSuccess={(
response // This will update our project context
) => ProjectsStore.onUpdateSuccess(response)}
>
<FieldFromConfig
getData={getOptionsData}
field={{
type: 'boolean',
name: 'filters:chunk-load-error',
label: t('Filter out ChunkLoadError(s)'),
help: t(
'It can happen that in full automatic deploy environments like Next.js & Vercel the frontend gets out of sync with the backend which results in a ChunkLoadError. The application refreshes and everything should work as expected.'
),
disabled: !hasAccess,
}}
/>
</NestedForm>
</PanelItem>
</PanelBody>
</Panel>

Expand Down