@iankibetsh/shframework 5.0.4 → 5.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/library.js +4 -3
- package/dist/library.mjs +4 -3
- package/package.json +1 -1
package/dist/library.js
CHANGED
|
@@ -2192,7 +2192,7 @@ function updateModelValue(){
|
|
|
2192
2192
|
if(selectedItems.length === 0) {
|
|
2193
2193
|
if(props.allowUserInput){
|
|
2194
2194
|
emit('update:modelValue', searchText.value);
|
|
2195
|
-
|
|
2195
|
+
return
|
|
2196
2196
|
} else {
|
|
2197
2197
|
emit('update:modelValue', null);
|
|
2198
2198
|
}
|
|
@@ -2219,16 +2219,17 @@ function filterData(e){
|
|
|
2219
2219
|
showDropDown();
|
|
2220
2220
|
let filterValue = e.target.innerText;
|
|
2221
2221
|
searchText.value = filterValue;
|
|
2222
|
+
if(props.allowUserInput){
|
|
2223
|
+
updateModelValue();
|
|
2224
|
+
}
|
|
2222
2225
|
if (props.url) {
|
|
2223
2226
|
fetchRemoteData();
|
|
2224
|
-
updateModelValue();
|
|
2225
2227
|
} else if(props.data) {
|
|
2226
2228
|
suggestions.value = props.data.filter(item=>{
|
|
2227
2229
|
if(item.name.toLowerCase().includes(filterValue.toLowerCase())){
|
|
2228
2230
|
return item
|
|
2229
2231
|
}
|
|
2230
2232
|
});
|
|
2231
|
-
updateModelValue();
|
|
2232
2233
|
} else {
|
|
2233
2234
|
console.log("Error: no data or url provided");
|
|
2234
2235
|
}
|
package/dist/library.mjs
CHANGED
|
@@ -2180,7 +2180,7 @@ function updateModelValue(){
|
|
|
2180
2180
|
if(selectedItems.length === 0) {
|
|
2181
2181
|
if(props.allowUserInput){
|
|
2182
2182
|
emit('update:modelValue', searchText.value);
|
|
2183
|
-
|
|
2183
|
+
return
|
|
2184
2184
|
} else {
|
|
2185
2185
|
emit('update:modelValue', null);
|
|
2186
2186
|
}
|
|
@@ -2207,16 +2207,17 @@ function filterData(e){
|
|
|
2207
2207
|
showDropDown();
|
|
2208
2208
|
let filterValue = e.target.innerText;
|
|
2209
2209
|
searchText.value = filterValue;
|
|
2210
|
+
if(props.allowUserInput){
|
|
2211
|
+
updateModelValue();
|
|
2212
|
+
}
|
|
2210
2213
|
if (props.url) {
|
|
2211
2214
|
fetchRemoteData();
|
|
2212
|
-
updateModelValue();
|
|
2213
2215
|
} else if(props.data) {
|
|
2214
2216
|
suggestions.value = props.data.filter(item=>{
|
|
2215
2217
|
if(item.name.toLowerCase().includes(filterValue.toLowerCase())){
|
|
2216
2218
|
return item
|
|
2217
2219
|
}
|
|
2218
2220
|
});
|
|
2219
|
-
updateModelValue();
|
|
2220
2221
|
} else {
|
|
2221
2222
|
console.log("Error: no data or url provided");
|
|
2222
2223
|
}
|