From 4545664bbece1b1b185945376b344b1660669a53 Mon Sep 17 00:00:00 2001
From: 이민희 <mhlee@maprex.co.kr>
Date: 목, 13 1월 2022 17:40:35 +0900
Subject: [PATCH] ㅐ 오타 제거

---
 src/main/webapp/custom_components/js-autocomplete-single/js-autocomplete-single.js |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/src/main/webapp/custom_components/js-autocomplete-single/js-autocomplete-single.js b/src/main/webapp/custom_components/js-autocomplete-single/js-autocomplete-single.js
index e8ad598..33d11ed 100644
--- a/src/main/webapp/custom_components/js-autocomplete-single/js-autocomplete-single.js
+++ b/src/main/webapp/custom_components/js-autocomplete-single/js-autocomplete-single.js
@@ -23,6 +23,7 @@
                 page : "=",
                 totalPage : "=",
                 inputDisabled : "=",
+                customInput : "=",
             },
             templateUrl : "custom_components/js-autocomplete-single/js-autocomplete-single.html",
             link : function ($scope, $element, $attrs) {
@@ -33,6 +34,10 @@
                 if (!angular.isDefined($scope.inputDisabled)) {
                     $scope.inputDisabled = false;
                 }
+
+                /*if (!angular.isDefined($scope.customInput)) {
+                    $scope.customInput = false;
+                }*/
 
                 $scope.options = [];    //  �쟾泥� 紐⑸줉
                 $scope.networkSuccess = false;  //  �넻�떊 �셿猷� �썑 �솕硫� �몴�떆.
@@ -153,7 +158,7 @@
 
                 // 寃��깋�맂 �븘�씠�뀥 �겢由��떆 �엯�젰 �븘�뱶 �룷而ㅼ뒪 二쇨린
                 function searchInputField() {
-                    if ($scope.selectedModel.length > 0) {
+                    if (angular.isDefined($scope.selectedModel) && $scope.selectedModel.length > 0) {
                         $($element).find(".input-tag-search-field-readonly").focus();
                     }
                 }
@@ -285,7 +290,9 @@
                             switch (event.keyCode) {
                                 case 9 :  //  �꺆�궎 �떕湲�
                                     $scope.open = false;
-                                    $scope.search = "";
+                                    if (!angular.isDefined($scope.customInput) && !$scope.customInput) {
+                                        $scope.search = "";
+                                    }
                                     $scope.page = 0;
                                     $scope.totalPage = 0;
                                     $scope.options = [];
@@ -523,7 +530,9 @@
                                 $scope.$apply(function () {
                                     $scope.open = false;
                                     if ($scope.selectedModel == null || $scope.selectedModel.length == 0) {
-                                        $scope.search = "";
+                                        if (!angular.isDefined($scope.customInput) && !$scope.customInput) {
+                                            $scope.search = "";
+                                        }
                                     }
                                     $scope.page = 0;
                                     $scope.totalPage = 0;

--
Gitblit v1.8.0