Edit field options as sidebar (#190)
* Edit field options as sidebar * WIP * Finish dynamic positioning of sidebar * Open block on addition, fix pro tag, add visual clue field open * fix typo * remove extra code * remove extra code --------- Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
13
resources/js/store/modules/open/working_form.js
vendored
13
resources/js/store/modules/open/working_form.js
vendored
@@ -6,7 +6,7 @@ export const state = {
|
||||
|
||||
// Field being edited
|
||||
selectedFieldIndex: null,
|
||||
showEditFieldModal: null
|
||||
showEditFieldSidebar: null
|
||||
}
|
||||
|
||||
// mutations
|
||||
@@ -23,16 +23,13 @@ export const mutations = {
|
||||
index = state.content.properties.findIndex(prop => prop.id === index.id)
|
||||
}
|
||||
state.selectedFieldIndex = index
|
||||
state.showEditFieldModal = true
|
||||
state.showEditFieldSidebar = true
|
||||
},
|
||||
setSelectedFieldIndex (state, index) {
|
||||
state.selectedFieldIndex = index
|
||||
},
|
||||
openEditFieldModal (state) {
|
||||
state.showEditFieldModal = true
|
||||
},
|
||||
closeEditFieldModal (state) {
|
||||
state.showEditFieldModal = false
|
||||
this.selectedFieldIndex = null
|
||||
closeEditFieldSidebar (state) {
|
||||
state.showEditFieldSidebar = false
|
||||
state.selectedFieldIndex = null
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user