refactor: default should selectable

Signed-off-by: Yi-Ya Chen <yiya.chen@suse.com>
This commit is contained in:
Yi-Ya Chen 2025-03-06 15:34:45 +08:00
parent 72415622d9
commit 64b59a0c27
No known key found for this signature in database
GPG Key ID: 9A2E6FBD33F68EDE

View File

@ -167,8 +167,10 @@ export default {
}, },
isBackupVolumeSnapshotClassNameDisabled(driver) { isBackupVolumeSnapshotClassNameDisabled(driver) {
if (this.allowEmptySnapshotClassNameFeatureEnabled) return true; return driver === LONGHORN_DRIVER || this.allowEmptySnapshotClassNameFeatureEnabled;
},
isBackupVolumeSnapshotClassNameSelectable(driver) {
return driver === LONGHORN_DRIVER; return driver === LONGHORN_DRIVER;
}, },
@ -238,9 +240,9 @@ export default {
:mode="mode" :mode="mode"
required required
:disabled="isBackupVolumeSnapshotClassNameDisabled(driver.key)" :disabled="isBackupVolumeSnapshotClassNameDisabled(driver.key)"
:selectable="!allowEmptySnapshotClassNameFeatureEnabled"
:options="getVolumeSnapshotOptions(driver.key)" :options="getVolumeSnapshotOptions(driver.key)"
:label="t('harvester.setting.csiDriverConfig.backupVolumeSnapshotClassName')" :label="t('harvester.setting.csiDriverConfig.backupVolumeSnapshotClassName')"
@selectable="isBackupVolumeSnapshotClassNameSelectable(driver.key)"
@keydown.native.enter.prevent="()=>{}" @keydown.native.enter.prevent="()=>{}"
@update:value="update" @update:value="update"
/> />