Skip to content

Commit 6e62f73

Browse files
committed
feat: disable sorting option
1 parent 4ffa387 commit 6e62f73

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

doc/pages/configuration.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ export default {
206206
hideReadOnly: 'by default read-only properties are rendered as disabled fields, set this to true to hide them entirely',
207207
deleteReadOnly: 'set this to true to not only hide read-only properties, but also remove them from the model',
208208
hideTooltips: 'by default descriptions are rendered as help tooltip on properties, set this to true to disable this functionality',
209+
disableSorting: 'by default editable array are sortable, set this to tru to disable this functionality',
209210
context: 'an optional contextual information object, properties from here can be used as variables in URL templates',
210211
rules: 'some custom rule functions that can be referenced by the x-rules annotation on properties',
211212
idPrefix: 'a prefix applied to generated ids if you want to prevent potential conflicts',

lib/mixins/EditableArray.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ export default {
162162
])
163163
])
164164
]))
165-
list = h('v-container', { props: { gridListMd: true }, class: 'pt-0 px-2 ' + this.fullOptions.objectContainerClass }, [
165+
list = h('v-container', { props: { gridListMd: true }, class: 'pt-0 px-2 ' + this.fullOptions.objectContainerClass }, this.fullOptions.disableSorting ? listItems : [
166166
h('draggable', { props: { value: this.value },
167167
style: 'width: 100%;cursor: move;',
168168
on: { input: (value) => {

lib/utils/options.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export const defaultOptions = {
1919
deleteReadOnly: false,
2020
filesAsDataUrl: false,
2121
hideTooltips: false,
22+
disableSorting: false,
2223
context: {},
2324
rules: {},
2425
idPrefix: '',

0 commit comments

Comments
 (0)