FEATURE: Sortable json-editor items (#16403)

This commit is contained in:
Keegan George 2022-04-11 10:24:14 -07:00 committed by GitHub
parent 1e436f242e
commit 0a653179a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 3 deletions

View File

@ -29,8 +29,9 @@ export default Component.extend({
schema: this.model.jsonSchema,
disable_array_delete_all_rows: true,
disable_array_delete_last_row: true,
disable_array_reorder: true,
disable_array_copy: true,
disable_array_reorder: false,
disable_array_copy: false,
enable_array_copy: true,
disable_edit_json: true,
disable_properties: true,
disable_collapse: true,
@ -70,8 +71,11 @@ export default Component.extend({
class DiscourseJsonSchemaEditorIconlib {
constructor() {
this.mapping = {
delete: "times",
delete: "trash-alt",
add: "plus",
moveup: "arrow-up",
movedown: "arrow-down",
copy: "copy",
};
}

View File

@ -747,6 +747,17 @@
.btn-group {
margin-top: 0;
display: flex;
align-items: stretch;
gap: 0.5em;
.btn {
padding-block: 0.65em;
.d-icon {
margin-right: 0;
}
}
}
.json-editor-btn-delete {