mirror of
https://github.com/baserow/baserow.git
synced 2026-12-04 08:18:42 +00:00
* feat(builder): add click events to images, text and headings * fix(builder): allow element clicks to dismiss menus * feat(builder): add click actions to columns and containers * fix(builder): isolate nested interactive controls * feat(builder): add selection change events * test(builder): complete event fixtures for CI * fix: keep heading semantics and limit click areas on clickable builder elements --------- Co-authored-by: peter_baserow <peter@baserow.io>
30 lines
731 B
JavaScript
30 lines
731 B
JavaScript
import _ from 'lodash'
|
|
import formElement from '@baserow/modules/builder/mixins/formElement'
|
|
|
|
export default {
|
|
mixins: [formElement],
|
|
methods: {
|
|
async onSelectionChange(value) {
|
|
if (this.workflowActionsInProgress) return
|
|
|
|
const changed = !_.isEqual(this.inputValue, value)
|
|
this.inputValue = value
|
|
this.handleFormElementChange()
|
|
|
|
if (
|
|
!changed ||
|
|
this.isEditMode ||
|
|
this.applicationContext.mode === 'editing'
|
|
) {
|
|
return
|
|
}
|
|
|
|
// Let formElement's watcher store the value before action formulas read it.
|
|
await this.$nextTick()
|
|
return this.fireEvent(
|
|
this.elementType.getEventByName(this.element, 'change')
|
|
)
|
|
},
|
|
},
|
|
}
|