Repository: apache/superset
File: superset-frontend/src/features/alerts/AlertReportModal.tsx (TypeScript)

Code before:
          )}
          {(isReport || contentType === 'dashboard') && (
            <div className="inline-container">
              <StyledCheckbox
                data-test="bypass-cache"
                className="checkbox"
                checked={forceScreenshot}
                onChange={onForceScreenshotChange}
              >
                {t('Ignore cache when generating report')}
              </StyledCheckbox>
            </div>
          )}
        </StyledPanel>
        <StyledPanel
          header={
            <ValidatedPanelHeader
              title={TRANSLATIONS.SCHEDULE_TITLE}
              subtitle={t(
                'Define delivery schedule, timezone, and frequency settings.',
              )}
              validateCheckStatus={
                !validationStatus[Sections.Schedule].hasErrors
              }
              testId="schedule-panel"
            />
          }
          key="schedule"
        >
          <AlertReportCronScheduler
            value={currentAlert?.crontab || ''}
            onChange={newVal => updateAlertState('crontab', newVal)}
          />
          <StyledInputContainer>
            <div className="control-label">
              {t('Timezone')} <span className="required">*</span>
            </div>
            <TimezoneSelector
              onTimezoneChange={onTimezoneChange}
              timezone={currentAlert?.timezone}
              minWidth="100%"
            />
          </StyledInputContainer>
          <StyledInputContainer>
            <div className="control-label">
              {t('Log retention')}
              <span className="required">*</span>
            </div>
            <div className="input-container">
              <Select
                ariaLabel={t('Log retention')}

Review comment (suggestion):
```suggestion
                  onSelect={updateAnchorState}
```

Code after:
                    currentAlert?.dashboard?.value
                      ? {
                          value: currentAlert.dashboard.value,
                          label: currentAlert.dashboard.label,
                        }
                      : undefined
                  }
                  options={loadDashboardOptions}
                  onChange={onDashboardChange}
                  placeholder={t('Select dashboard to use')}
                />
              </>
            )}
          </StyledInputContainer>
          <StyledInputContainer
            css={
              ['PDF', 'TEXT', 'CSV'].includes(reportFormat) && noMarginBottom
            }
          >
            {formatOptionEnabled && (
              <>
                <div className="control-label">
                  {t('Content format')}
                  <span className="required">*</span>
                </div>
                <Select
                  ariaLabel={t('Select format')}
                  onChange={onFormatChange}
                  value={reportFormat}
                  options={
                    contentType === ContentType.Dashboard
                      ? ['pdf', 'png'].map(key => FORMAT_OPTIONS[key])
                      : /* If chart is of text based viz type: show text
                  format option */
                        TEXT_BASED_VISUALIZATION_TYPES.includes(chartVizType)
                        ? Object.values(FORMAT_OPTIONS)
                        : ['pdf', 'png', 'csv'].map(key => FORMAT_OPTIONS[key])
                  }
                  placeholder={t('Select format')}
                />
              </>
            )}
          </StyledInputContainer>
          {tabsEnabled && contentType === ContentType.Dashboard && (
            <StyledInputContainer>
              <>
                <div className="control-label">{t('Select tab')}</div>
                <StyledTreeSelect
                  disabled={tabOptions?.length === 0}
                  treeData={tabOptions}
                  value={currentAlert?.extra?.dashboard?.anchor}