Skip to content

Commit 8377148

Browse files
author
minjk-bl
committed
Fix Original SuggestInput's hover item styles
1 parent 85b6292 commit 8377148

File tree

7 files changed

+20
-10
lines changed

7 files changed

+20
-10
lines changed

css/component/dataSelector.css

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@
1919
.vp-ds-box input.vp-ds-target:disabled + .vp-ds-filter {
2020
cursor: not-allowed;
2121
}
22-
.vp-ds-item:hover {
23-
background: var(--light-gray-color);
24-
color: var(--font-highlight);
25-
cursor: pointer;
26-
}
2722
/* DataSelector popup */
2823
.vp-dataselector {
2924
display: none;

css/root.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,4 +513,10 @@ hr.vp-extra-menu-line {
513513
background: #eeeeee;
514514
margin: 0px;
515515
padding: 7px;
516+
}
517+
/* suggest input hover items */
518+
.vp-sg-item:hover {
519+
background: var(--light-gray-color);
520+
color: var(--font-highlight);
521+
cursor: pointer;
516522
}

js/com/com_generator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ define([
290290
let { result, type, msg } = resultObj;
291291
var varList = JSON.parse(result);
292292
varList = varList.map(function(v) {
293-
return { label: v.varName + ' (' + v.varType + ')', value: v.varName, dtype: v.varType };
293+
return { label: v.varName, value: v.varName, dtype: v.varType };
294294
});
295295
// 1. Target Variable
296296
var suggestInput = new SuggestInput();

js/com/com_generatorV2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ define([
460460
let { result, type, msg } = resultObj;
461461
var varList = JSON.parse(result);
462462
varList = varList.map(function(v) {
463-
return { label: v.varName + ' (' + v.varType + ')', value: v.varName, dtype: v.varType };
463+
return { label: v.varName, value: v.varName, dtype: v.varType };
464464
});
465465
// 1. Target Variable
466466
var suggestInput = new SuggestInput();

js/com/component/DataSelector.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ define([
211211
$(this).autocomplete('search', $(this).val());
212212
}).autocomplete('instance')._renderItem = function(ul, item) {
213213
return $('<li>').attr('data-value', item.value)
214-
.append(`<div class="vp-ds-item">${item.label}<label class="vp-gray-text vp-cursor">&nbsp;| ${item.dtype}</label></div>`)
214+
.append(`<div class="vp-sg-item">${item.label}<label class="vp-gray-text vp-cursor">&nbsp;| ${item.dtype}</label></div>`)
215215
.appendTo(ul);
216216
};
217217
}

js/com/component/SuggestInput.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,16 @@ define([
159159
}).click(function() {
160160
$(this).val('');
161161
$(com_util.formatString(".{0}", that.uuid)).autocomplete('search', $(com_util.formatString(".{0}", that.uuid)).val());
162-
});
162+
}).autocomplete('instance')._renderItem = function(ul, item) {
163+
if (item.dtype != undefined) {
164+
return $('<li>').attr('data-value', item.value)
165+
.append(`<div class="vp-sg-item">${item.label}<label class="vp-gray-text vp-cursor">&nbsp;| ${item.dtype}</label></div>`)
166+
.appendTo(ul);
167+
}
168+
return $('<li>').attr('data-value', item.value)
169+
.append(`<div class="vp-sg-item">${item.label}</div>`)
170+
.appendTo(ul);
171+
};;
163172
});
164173

165174
return sbTagString.toString();

js/m_apps/Subset.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ define([
659659
let { result } = resultObj;
660660
var varList = JSON.parse(result);
661661
varList = varList.map(function (v) {
662-
return { label: v.varName + ' (' + v.varType + ')', value: v.varName, dtype: v.varType };
662+
return { label: v.varName, value: v.varName, dtype: v.varType };
663663
});
664664

665665
that.state.dataList = varList;

0 commit comments

Comments
 (0)