Skip to content

Commit cd3eb8e

Browse files
committed
use isControlEditable
1 parent 89ee75a commit cd3eb8e

File tree

4 files changed

+8
-17
lines changed

4 files changed

+8
-17
lines changed

packages/vue-vuetify/src/additional/ListWithDetailRenderer.vue

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@
2727
:class="styles.listWithDetail.addButton"
2828
@click="addButtonClick"
2929
:disabled="
30-
!control.enabled ||
31-
control.readonly ||
30+
!isControlEditable(control) ||
3231
(appliedOptions.restrict &&
3332
control.arraySchema !== undefined &&
3433
control.arraySchema.maxItems !== undefined &&
@@ -127,8 +126,7 @@
127126
:aria-label="control.translations.downAriaLabel"
128127
:disabled="
129128
index >= dataLength - 1 ||
130-
!control.enabled ||
131-
control.readonly
129+
!isControlEditable(control)
132130
"
133131
:class="styles.listWithDetail.itemMoveDown"
134132
@click="moveDownClick($event, index)"
@@ -153,8 +151,7 @@
153151
:class="styles.listWithDetail.itemDelete"
154152
@click="removeItemsClick($event, [index])"
155153
:disabled="
156-
!control.enabled ||
157-
control.readonly ||
154+
!isControlEditable(control) ||
158155
(appliedOptions.restrict &&
159156
control.arraySchema !== undefined &&
160157
control.arraySchema.minItems !== undefined &&

packages/vue-vuetify/src/complex/ArrayControlRenderer.vue

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@
3333
v-bind="props"
3434
:class="styles.arrayList.addButton"
3535
:disabled="
36-
!control.enabled ||
37-
control.readonly ||
36+
!isControlEditable(control) ||
3837
(appliedOptions.restrict &&
3938
control.arraySchema !== undefined &&
4039
control.arraySchema.maxItems !== undefined &&
@@ -145,8 +144,7 @@
145144
:aria-label="control.translations.downAriaLabel"
146145
:disabled="
147146
index >= dataLength - 1 ||
148-
!control.enabled ||
149-
control.readonly
147+
!isControlEditable(control)
150148
"
151149
:class="styles.arrayList.itemMoveDown"
152150
@click="moveDownClick($event, index)"
@@ -169,8 +167,7 @@
169167
:aria-label="control.translations.removeAriaLabel"
170168
:class="styles.arrayList.itemDelete"
171169
:disabled="
172-
!control.enabled ||
173-
control.readonly ||
170+
!isControlEditable(control) ||
174171
(appliedOptions.restrict &&
175172
control.arraySchema !== undefined &&
176173
control.arraySchema.minItems !== undefined &&

packages/vue-vuetify/src/complex/OneOfRenderer.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ import {
104104
} from 'vuetify/components';
105105
import { DisabledIconFocus } from '../controls/directives';
106106
import {
107-
isControlEditable,
108107
useCombinatorTranslations,
109108
useTranslator,
110109
useVuetifyControl,

packages/vue-vuetify/src/layouts/ArrayLayoutRenderer.vue

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,7 @@
149149
:aria-label="control.translations.downAriaLabel"
150150
:disabled="
151151
index >= dataLength - 1 ||
152-
!control.enabled ||
153-
control.readonly
152+
!isControlEditable(control)
154153
"
155154
:class="styles.arrayList.itemMoveDown"
156155
@click="moveDownClick($event, index)"
@@ -176,8 +175,7 @@
176175
:aria-label="control.translations.removeAriaLabel"
177176
:class="styles.arrayList.itemDelete"
178177
:disabled="
179-
!control.enabled ||
180-
control.readonly ||
178+
!isControlEditable(control) ||
181179
(appliedOptions.restrict &&
182180
control.arraySchema !== undefined &&
183181
control.arraySchema.minItems !== undefined &&

0 commit comments

Comments
 (0)