Skip to content

Commit

Permalink
feat: add default name for scope config (apache#6937)
Browse files Browse the repository at this point in the history
  • Loading branch information
mintsweet committed Feb 8, 2024
1 parent ab7b941 commit 822792c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion config-ui/src/plugins/components/scope-config-form/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import { TIPS_MAP } from './misc';
interface Props {
plugin: string;
connectionId: ID;
defaultName?: string;
showWarning?: boolean;
scopeId?: ID;
scopeConfigId?: ID;
Expand All @@ -49,14 +50,15 @@ interface Props {
export const ScopeConfigForm = ({
plugin,
connectionId,
defaultName,
showWarning = false,
scopeId,
scopeConfigId,
onCancel,
onSubmit,
}: Props) => {
const [step, setStep] = useState(1);
const [name, setName] = useState('');
const [name, setName] = useState(defaultName);
const [entities, setEntities] = useState<string[]>([]);
const [transformation, setTransformation] = useState<any>({});
const [hasError, setHasError] = useState(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ export const ScopeConfigSelect = ({ plugin, connectionId, scopeConfigId, onCance
<ScopeConfigForm
plugin={plugin}
connectionId={connectionId}
defaultName={`shared-config-<${dataSource.length}>`}
showWarning={!!updatedId}
scopeConfigId={updatedId}
onCancel={handleHideDialog}
Expand Down

0 comments on commit 822792c

Please sign in to comment.