Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions src/wwElement.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
<script>
import Multiselect from '@vueform/multiselect';
import OptionItem from './OptionItem.vue';
import { computed, inject } from 'vue';
import { computed } from 'vue';

const DEFAULT_LABEL_FIELD = 'label';
const DEFAULT_VALUE_FIELD = 'value';
Expand All @@ -103,11 +103,7 @@ export default {
defaultValue: computed(() => props.content.initialValue ?? ''),
});

const styles = inject('componentStyle');

const cursor = computed(() => styles.cursor);

return { currentSelection, setCurrentSelection, cursor };
return { currentSelection, setCurrentSelection };
},
data: () => ({
options: [],
Expand Down Expand Up @@ -192,7 +188,6 @@ export default {
'--search-font-size': this.content.searchFontSize || 'inherit',
'--search-font-family': this.content.searchFontFamily || 'inherit',
'--search-font-color': this.content.searchFontColor || 'inherit',
'--component-cursor': this.cursor || 'pointer',
};
},
isReadonly() {
Expand Down Expand Up @@ -390,7 +385,7 @@ export default {
<style type="scss" scoped>
/* We need to use multiselect classname */
.ww-input-select {
cursor: var(--component-cursor);
cursor: var(--component-cursor, pointer);
--ms-bg: transparent;

--ms-border-width: 0px;
Expand All @@ -402,7 +397,7 @@ export default {
}
}
.ww-input-select:deep(.multiselect-wrapper) {
cursor: var(--component-cursor);
cursor: var(--component-cursor, pointer);
height: inherit;
min-height: unset;
}
Expand Down Expand Up @@ -436,6 +431,9 @@ export default {
padding: 0px !important;
width: 100%;
}
.ww-input-select:deep(.multiselect-option:not(.is-pointed):not(.is-selected):not(.is-disabled)) {
color: var(--ms-option-color, #000000);
}
.ww-input-select:deep(.multiselect-placeholder-el) {
flex-grow: 1;
width: 100%;
Expand Down
8 changes: 8 additions & 0 deletions ww-config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
export default {
css({ style }) {
return [
{
property: '--component-cursor',
value: style.cursor,
},
];
},
editor: {
label: {
en: 'Input select',
Expand Down