refactor: default should selectable

Signed-off-by: Yi-Ya Chen <yiya.chen@suse.com>
(cherry picked from commit 64b59a0c2788b3a35734da58a948ed9746788098)
This commit is contained in:
Yi-Ya Chen 2025-03-06 15:34:45 +08:00 committed by Mergify
parent 4d7b0f7350
commit a607b604f8

View File

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