mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-13 17:10:06 +00:00
refactor: remove redundant = false defaults on boolean props (#9155)
## Summary Remove redundant `= false` defaults from destructured `defineProps` on boolean props, since Vue's [Boolean casting](https://vuejs.org/guide/components/props.html#boolean-casting) already defaults absent boolean props to `false`. ## Changes - **What**: Remove 10 unnecessary `= false` default values across 8 components ## Review Focus Vue compiles `defineProps<{ myBool?: boolean }>()` to `{ myBool: { type: Boolean, required: false } }`. Boolean casting means absent boolean props are already `false` — the explicit `= false` in JS destructuring defaults never triggers. Follow-up to #9150. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-9155-refactor-remove-redundant-false-defaults-on-boolean-props-3116d73d36508196af0bcba53257720a) by [Unito](https://www.unito.io)
This commit is contained in:
@@ -63,7 +63,7 @@ const {
|
||||
options,
|
||||
optionLabel = 'label',
|
||||
optionValue = 'value',
|
||||
disabled = false
|
||||
disabled
|
||||
} = defineProps<Props>()
|
||||
|
||||
const emit = defineEmits<Emits>()
|
||||
|
||||
@@ -20,7 +20,7 @@ interface Props {
|
||||
}
|
||||
|
||||
const {
|
||||
isOpen = false,
|
||||
isOpen,
|
||||
placeholder = 'Select...',
|
||||
items,
|
||||
displayItems,
|
||||
|
||||
Reference in New Issue
Block a user