mirror of
				https://github.com/Fabio286/antares.git
				synced 2025-06-05 21:59:22 +02:00 
			
		
		
		
	fix: cell update soft reload doesn't apply changes
This commit is contained in:
		| @@ -257,10 +257,13 @@ export default { | ||||
|          } | ||||
|       }, | ||||
|       applyUpdate (params) { | ||||
|          const { primary, id, field, content } = params; | ||||
|          const { primary, id, field, table, content } = params; | ||||
|  | ||||
|          this.localResults = this.localResults.map(row => { | ||||
|             if (row[primary] === id) | ||||
|             if (row[primary] === id)// only fieldName | ||||
|                row[field] = content; | ||||
|             else if (row[`${table}.${primary}`] === id)// table.fieldName | ||||
|                row[`${table}.${field}`] = content; | ||||
|  | ||||
|             return row; | ||||
|          }); | ||||
|   | ||||
| @@ -35,7 +35,7 @@ | ||||
|             v-if="results" | ||||
|             v-show="!isQuering" | ||||
|             ref="queryTable" | ||||
|             :results="[results]" | ||||
|             :results="results" | ||||
|             :tab-uid="tabUid" | ||||
|             @update-field="updateField" | ||||
|             @delete-selected="deleteSelected" | ||||
| @@ -72,7 +72,7 @@ export default { | ||||
|       return { | ||||
|          tabUid: 'data', | ||||
|          isQuering: false, | ||||
|          results: {}, | ||||
|          results: [], | ||||
|          fields: [], | ||||
|          keyUsage: [], | ||||
|          lastTable: null, | ||||
| @@ -116,7 +116,7 @@ export default { | ||||
|       async getTableData () { | ||||
|          if (!this.table) return; | ||||
|          this.isQuering = true; | ||||
|          this.results = {}; | ||||
|          this.results = []; | ||||
|          const fieldsArr = []; | ||||
|          const keysArr = []; | ||||
|          this.setTabFields({ cUid: this.connection.uid, tUid: this.tabUid, fields: [] }); | ||||
| @@ -144,7 +144,7 @@ export default { | ||||
|             const { status, response } = await Tables.getTableData(params); | ||||
|  | ||||
|             if (status === 'success') | ||||
|                this.results = response; | ||||
|                this.results = [response]; | ||||
|             else | ||||
|                this.addNotification({ status: 'error', message: response }); | ||||
|          } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user