QSelectbox 수정
This commit is contained in:
parent
2929c0cb03
commit
0ab0e9b1e9
@ -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]
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user