@eturnity/eturnity_reusable_components 1.0.93 → 1.0.94
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/package.json
CHANGED
|
@@ -114,15 +114,18 @@
|
|
|
114
114
|
// :optionItems="groupComponents" // list of options
|
|
115
115
|
// :optionsLoading="dropdownOptionsLoading"
|
|
116
116
|
// :optionsDisplay="['display_name', 'company_item_number']" // Array. what should be displayed
|
|
117
|
+
// :disabled="true"
|
|
117
118
|
// />
|
|
118
119
|
import styled from "vue-styled-components"
|
|
119
120
|
import Spinner from "@eturnity/eturnity_reusable_components/src/components/spinner"
|
|
120
121
|
import SearchInput from "@eturnity/eturnity_reusable_components/src/components/inputs/searchInput"
|
|
121
122
|
|
|
122
|
-
const
|
|
123
|
+
const rowAttrs = { disabled: Boolean }
|
|
124
|
+
const DropdownRow = styled("td", rowAttrs)`
|
|
125
|
+
cursor: ${(props) => (props.disabled ? "not-allowed" : "auto")};
|
|
126
|
+
`
|
|
123
127
|
|
|
124
128
|
const ComponentItem = styled.div`
|
|
125
|
-
/* padding-left: 12px; */
|
|
126
129
|
overflow: hidden;
|
|
127
130
|
text-overflow: ellipsis;
|
|
128
131
|
`
|
|
@@ -283,6 +286,10 @@ export default {
|
|
|
283
286
|
required: true,
|
|
284
287
|
default: [], // should be like ['display_name', 'company_item_number', 'description']
|
|
285
288
|
},
|
|
289
|
+
disabled: {
|
|
290
|
+
required: false,
|
|
291
|
+
default: false,
|
|
292
|
+
},
|
|
286
293
|
},
|
|
287
294
|
data() {
|
|
288
295
|
return {
|
|
@@ -291,6 +298,9 @@ export default {
|
|
|
291
298
|
},
|
|
292
299
|
methods: {
|
|
293
300
|
toggleOpen() {
|
|
301
|
+
if (this.disabled) {
|
|
302
|
+
return
|
|
303
|
+
}
|
|
294
304
|
if (!this.isOpen) {
|
|
295
305
|
document.addEventListener("click", this.clickOutside)
|
|
296
306
|
this.$emit("dropdown-search", "")
|