Ensure that autocomplete works properly with objects starting with double quotes. #5281

This commit is contained in:
Akshay Joshi
2022-11-15 13:59:12 +05:30
parent 669a3a7673
commit aa4f992e30
2 changed files with 4 additions and 1 deletions

View File

@@ -125,8 +125,9 @@ function registerAutocomplete(api, transId, sqlEditorPref, onFailure) {
// This function is used to filter the data and call the callback
// function with that filtered data.
function setAutoCompleteData() {
const searchRe = new RegExp('^"{0,1}' + search, 'i');
let filterData = self_local.editor.state.autoCompleteList.filter((item)=>{
return item.text.toLowerCase().startsWith(search.toLowerCase());
return searchRe.test(item.text)
});
cb({