Skip to content

Commit e645b4d

Browse files
committed
Added fontawsome, fix active value
1 parent 01b3929 commit e645b4d

File tree

4 files changed

+21
-6
lines changed

4 files changed

+21
-6
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vue3-hive-ui-kit",
33
"private": false,
4-
"version": "0.7.4",
4+
"version": "0.7.5",
55
"type": "module",
66
"description": "UI kit for Vue 3",
77
"files": [

src/common/hooks/use-list-methods.ts

+2
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ export const useListMethods = ({
104104
const expand = () => {
105105
isExpanded.value = true;
106106

107+
setFirstActiveValue();
108+
107109
if (currentValue.value && !Array.isArray(currentValue.value)) {
108110
activeValue.value = currentValue.value;
109111
}

src/examples/components/all-widgets.vue

+4-4
Original file line numberDiff line numberDiff line change
@@ -237,15 +237,15 @@ const optionsObject = {
237237
238238
const maritalStatusList = ref([
239239
{
240-
id: 0,
240+
id: 1,
241241
title: 'холост',
242242
},
243243
{
244-
id: 1,
244+
id: 2,
245245
title: 'женат',
246246
},
247247
{
248-
id: 2,
248+
id: 3,
249249
title: 'женат2',
250250
},
251251
]);
@@ -823,7 +823,7 @@ const optionsObject1 = {
823823
</widget-wrapper>
824824
<widget-wrapper title="Multiselect">
825825
{{ checkbox }}
826-
<!-- <hive-multiselect :options="a" v-model="store" with-null /> -->
826+
<hive-multiselect :options="maritalStatusList" v-model="multiselect" title-field="title" value-field="id" />
827827
<hive-textarea v-model="text" resize-direction="both" :style="{ width: '300px' }" disabled />
828828
</widget-wrapper>
829829
<widget-wrapper title="Autocompelte">

src/index.ts

+14-1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,15 @@ import type { HiveUploadFilesType } from './components/hive-upload-file/hive-upl
3636

3737
import '@/assets/variables.scss';
3838

39+
/* import the fontawesome core */
40+
import { library } from '@fortawesome/fontawesome-svg-core';
41+
42+
/* import font awesome icon component */
43+
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
44+
45+
/* import specific icons */
46+
import { faSearch, faXmark } from '@fortawesome/free-solid-svg-icons';
47+
3948
export {
4049
HiveAutocomplete,
4150
HiveBadge,
@@ -66,6 +75,10 @@ export {
6675
Notification,
6776
notify,
6877
useNotification,
78+
library,
79+
FontAwesomeIcon,
80+
faSearch,
81+
faXmark,
6982
};
7083

7184
export type {
@@ -81,4 +94,4 @@ export type {
8194
ChoosenNode,
8295
TreeImg,
8396
HiveUploadFilesType,
84-
}
97+
};

0 commit comments

Comments
 (0)