QSelectbox 수정

This commit is contained in:
yjnoh 2025-01-07 17:07:49 +09:00
parent 2929c0cb03
commit 0ab0e9b1e9

View File

@ -33,11 +33,12 @@ export default function QSelectBox({
* @returns {string} 초기 상태 * @returns {string} 초기 상태
*/ */
const handleInitState = () => { const handleInitState = () => {
if (showKey !== '' && isObjectNotEmpty(value)) { if (showKey !== '' && !value) {
//value showKey //value showKey
return options[0][showKey] return options[0][showKey]
} else if (showKey !== '' && !isObjectNotEmpty(value)) { } else if (showKey !== '' && value) {
//value sourceKey targetKey //value sourceKey targetKey
const option = options.find((option) => { const option = options.find((option) => {
return option[sourceKey] === value[targetKey] return option[sourceKey] === value[targetKey]
}) })