fix: changed notice always display

This commit is contained in:
jialin
2026-06-11 20:02:27 +08:00
committed by jialin
parent a7b33a928b
commit 77e92432ed
4 changed files with 5 additions and 8 deletions
@@ -263,10 +263,6 @@ const ClusterForm: React.FC<AddModalProps> = forwardRef(
<Form.Item<FormData>
name="description"
rules={[{ required: false }]}
// For Kubernetes the cluster type selector follows directly, so
// fall back to the default item margin (matching the name field)
// to keep the description spacing symmetric; other providers keep
// the tighter gap before the advanced panel.
style={{
marginBottom:
provider === ProviderValueMap.Kubernetes ? undefined : 8
@@ -56,7 +56,6 @@ export const OperatorImageForm: React.FC = () => {
<SectionWrap>
<Form.Item
name={['k8s_options', 'operatorImage']}
style={{ marginBottom: 0 }}
normalize={(value) => value || null}
>
<CInput.Input
@@ -299,7 +298,7 @@ const cleanK8sOptions = (opts: any) => {
({ sourceType, ...rest }: any) => rest
);
}
return cloned;
return _.pickBy(cloned, (value: any) => !_.isNil(value));
};
// Custom comparator for isEqualWith: treats null, undefined, empty strings,
@@ -312,7 +311,8 @@ const nullishCustomizer = (val1: any, val2: any) => {
(val1 == null && val2 === '') ||
(val1 === '' && val2 == null) ||
(_.isEmpty(val1) && val2 == null) ||
(val1 == null && _.isEmpty(val2))
(val1 == null && _.isEmpty(val2)) ||
(_.isNil(val1) && _.isNil(val2))
) {
return true;
}
@@ -97,7 +97,6 @@ const ClusterAdvanceConfig: React.FC<{
this column). */}
<Form.Item<FormData>
name="system_default_container_registry"
style={{ marginBottom: 16 }}
normalize={(value) => value?.trim?.() || null}
>
<CInput.Input