File tree Expand file tree Collapse file tree 2 files changed +16
-12
lines changed Expand file tree Collapse file tree 2 files changed +16
-12
lines changed Original file line number Diff line number Diff line change 10
10
<TaskTypeSelect
11
11
:value.sync =" mySelectedTaskTypeId"
12
12
class =" task-custom-select"
13
- :inline =" 5"
14
13
:options =" sortedTaskTypes"
15
14
@update:value =" onTaskTypeUserChange" />
16
15
<div v-if =" showHistory"
38
37
@load-task =" onHistoryLoadTask" />
39
38
</div >
40
39
<div v-else class =" task-input-output-form" >
41
- <!-- h2 v-if="selectedTaskType"
42
- class="task-name">
43
- {{ selectedTaskType.name }}
44
- </h2>
45
- <span v-if="selectedTaskType"
46
- class="task-description">
47
- {{ selectedTaskType.description }}
48
- </span-->
49
40
<AssistantFormInputs v-if =" selectedTaskType"
50
41
:inputs.sync =" myInputs"
51
42
:selected-task-id =" selectedTaskId"
Original file line number Diff line number Diff line change 8
8
@click =" onTaskSelected(t)" >
9
9
{{ t.name }}
10
10
</NcButton >
11
- <NcActions v-if =" actionTypes.length > 0"
11
+ <NcActions v-if =" !onlyInline && actionTypes.length > 0"
12
12
:force-menu =" true"
13
13
:container =" $refs.taskTypeSelect" >
14
14
<NcActionButton v-for =" (t, i) in actionTypes"
@@ -49,9 +49,13 @@ export default {
49
49
type: Array ,
50
50
required: true ,
51
51
},
52
+ /**
53
+ * Number of inline elements
54
+ * All elements are inline if this prop is null
55
+ */
52
56
inline: {
53
- type: Number ,
54
- default: 3 ,
57
+ type: [ Number , null ] ,
58
+ default: null ,
55
59
},
56
60
},
57
61
@@ -66,7 +70,13 @@ export default {
66
70
},
67
71
68
72
computed: {
73
+ onlyInline () {
74
+ return this .inline === null
75
+ },
69
76
buttonTypes () {
77
+ if (this .onlyInline ) {
78
+ return this .options
79
+ }
70
80
// extra button replaces the last one
71
81
if (this .extraButtonType !== null ) {
72
82
const types = this .options .slice (0 , this .inline - 1 )
@@ -104,6 +114,9 @@ export default {
104
114
105
115
methods: {
106
116
moveSelectedIfInMenu () {
117
+ if (this .onlyInline ) {
118
+ return
119
+ }
107
120
// if the initially selected value is in the dropdown, get it out
108
121
const selectedAction = this .actionTypes .find (a => a .id === this .value )
109
122
if (this .actionTypes .find (a => a .id === this .value )) {
You can’t perform that action at this time.
0 commit comments