classcard-ui 0.2.251 → 0.2.252
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/classcard-ui.common.js +17308 -53
- package/dist/classcard-ui.common.js.map +1 -1
- package/dist/classcard-ui.umd.js +17308 -53
- package/dist/classcard-ui.umd.js.map +1 -1
- package/dist/classcard-ui.umd.min.js +16 -8
- package/dist/classcard-ui.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/CSelect/CSelect.vue +9 -4
package/package.json
CHANGED
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
:type="icon.type"
|
|
44
44
|
>
|
|
45
45
|
</c-icon>
|
|
46
|
-
<span :class="showImage ? 'ml-3' : ''" class="block truncate">
|
|
47
|
-
|
|
48
|
-
selectSearch
|
|
46
|
+
<span :class="showImage ? 'ml-3' : ''" class="block truncate text-sm">
|
|
47
|
+
{{ selectedValue ? selectedValue :
|
|
48
|
+
!selectSearch || selectSearch == '' ? placeholder : null
|
|
49
49
|
}}
|
|
50
50
|
</span>
|
|
51
51
|
</span>
|
|
@@ -136,6 +136,7 @@
|
|
|
136
136
|
<script>
|
|
137
137
|
import CIcon from "../CIcon/CIcon.vue";
|
|
138
138
|
import CAvatar from "../CAvatar/CAvatar.vue";
|
|
139
|
+
import { isNumber } from 'lodash';
|
|
139
140
|
export default {
|
|
140
141
|
name: "CSelect",
|
|
141
142
|
components: { CIcon, CAvatar },
|
|
@@ -216,6 +217,7 @@ export default {
|
|
|
216
217
|
},
|
|
217
218
|
methods: {
|
|
218
219
|
handleSelect(event, option) {
|
|
220
|
+
this.selectSearch = null;
|
|
219
221
|
this.selectedValue = option[this.renderOptionName];
|
|
220
222
|
this.$emit("onChangeValue", option);
|
|
221
223
|
this.toggleDropdown = false;
|
|
@@ -224,18 +226,21 @@ export default {
|
|
|
224
226
|
this.$emit("listAction", event);
|
|
225
227
|
},
|
|
226
228
|
close() {
|
|
229
|
+
this.selectSearch = null;
|
|
227
230
|
this.toggleDropdown = false;
|
|
228
231
|
this.type === "tertiary" ? (this.showFocus = false) : "";
|
|
229
232
|
},
|
|
230
233
|
search() {
|
|
234
|
+
this.selectedValue = null;
|
|
231
235
|
if(!this.selectSearch && this.selectSearch == '') {
|
|
232
236
|
this.renderOptions = this.options;
|
|
237
|
+
return;
|
|
233
238
|
}
|
|
234
239
|
let options = [...this.options];
|
|
235
240
|
this.renderOptions = options.filter((option) => {
|
|
241
|
+
isNumber(option[this.renderOptionName]) ? option[this.renderOptionName] = option[this.renderOptionName].toString() : "";
|
|
236
242
|
return option[this.renderOptionName].toLowerCase().includes(this.selectSearch.toLowerCase());
|
|
237
243
|
});
|
|
238
|
-
console.log(this.renderOptions);
|
|
239
244
|
}
|
|
240
245
|
},
|
|
241
246
|
watch: {
|