-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: LS: Completion ListsThe issue relates to showing completion lists in an editorThe issue relates to showing completion lists in an editorFix AvailableA PR has been opened for this issueA PR has been opened for this issue
Milestone
Description
Bug Report
π Search Terms
react, intellisense
π Version & Regression Information
version: 4.2.3
I just test in recent vscode and the playground link.
β― Playground Link
Playground link with relevant code
π» Code
import React, { ReactElement } from 'react';
import {InputNumber as RawInputNumber} from 'antd';
function Test2()
{
var a = [/*a*/];
var b = <div>
/*b*/
</div>;
var c = <>
/*c*/
</>
}
function InputNumber():ReactElement<any,any>|null
{
return null;
}
class ClassComponent extends React.Component
{
render()
{
return null;
}
}
function FunctionComponent(props: any): ReactElement<any, any> | null
{
return null;
};Please try to input the <InputNumber/>, <ClassComponent/> and <FunctionComponent/> at comment a,b and c.
π Actual behavior
In the comment a: all things are correct.
In the comment b and c:
When you start to input <, the completion list doesn't contains InputNumber, ClassComponent and FunctionComponent. But RawInputNumber(the import one) is in the list.
And in vscode, it will be worse: it tries to import {InputNumber} from 'antd', and make the local defined InputNumber conflit.
π Expected behavior
Make the local define component in the completion when input <
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: LS: Completion ListsThe issue relates to showing completion lists in an editorThe issue relates to showing completion lists in an editorFix AvailableA PR has been opened for this issueA PR has been opened for this issue