LWC Linter - SObject autocompletion works but upon selection, the 'Unresolved variable' error still shows.
Issue #2134
resolved
- Create a controller that returns an SObject list
- In the LWC, fetch the records using that controller, and iterate over the list. Each ‘row’ has the correct autocomplete suggestions.
3. Select one of the suggestions, and the following linter error is show:
Kind of weird that the linter knows those fields exist but does not recognise them upon selection.
Comments (2)
-
repo owner -
repo owner - changed status to resolved
Issue tracker grooming. If this is still an issue, please feel free to reopen, ideally with a concrete reproduction scenario.
- Log in to comment
Can you provide a little more detail about how you're getting to this? I added an import for an
@AuraEnabled
method that returns a list ofExpense__c
SObjects, and it's resolving everything fine, e.g.:has no errors, and the expression
expense.Amount__c
properly resolves to the fieldExpense__c.Amount__c
in the TypeScript interfaceExpense__c
from the OST.