1
0
Fork 0
mirror of https://gitlab.com/bramw/baserow.git synced 2025-04-26 05:37:13 +00:00

Fix bug when generating multiple cell values for the AI field

This commit is contained in:
Davide Silvestri 2024-04-11 16:41:52 +02:00
parent a8db75b31c
commit 1641a3cf9a

View file

@ -1546,14 +1546,10 @@ export default {
* Shows the context menu with the appropriate options.
*/
getMultiSelectContextItems() {
const selectedFields = this.$store.getters[
this.storePrefix + 'view/grid/getSelectedFields'
](this.fields)
if (selectedFields.length === 1) {
return this.$registry
.get('field', selectedFields[0].type)
.getGridViewContextItemsOnCellsSelection(selectedFields[0])
const selectedField = this.getSelectedField()
if (selectedField) {
const fieldType = this.$registry.get('field', selectedField.type)
return fieldType.getGridViewContextItemsOnCellsSelection(selectedField)
} else {
return []
}