(TypeError) $0.$connector is undefined

Hi, perhaps you can help me.
When i try to select the first line of my grid i have this error on the page in the brower
“(typeerror) $0.$connector is undefined”.
For information my grid is loaded simply with those code

List<TarifT> listT = recupTarif();
gridTarif.setItems(listT);
		
if (listT.size() > 0)
	gridTarif.select(listT.get(0)); //it's the line that cause the bug

Thank you for your answer

That code doesn’t seem to be enough to reproduce the issue.

OK sorry, I’m going to explain my application.
I have on my home page a grid with different elements.
When i double clicked on a row I open a dialog that contains a grid
with several row. In this grid I want to select the first line when the dialog
is opened.

You can find below my code for the dialog

public class DlgTest extends Dialog
{
	private static final long serialVersionUID = 1L;
	
	private ComposantTRepository repoComp;
	private TarifTRepository tarifRepo;

	private ComposantT compCourant;
	
	private Grid<TarifT> gridTarif = new Grid<>();
	
	private ButtonSteel bt;

	// ********** Constructeur **********
	public DlgTest(
			ComposantTRepository argRepoComp, TarifTRepository tarifRepo)	{
		this.repoComp = argRepoComp;
		this.tarifRepo = tarifRepo;
		
		this.setCloseOnEsc(false);
		this.setCloseOnOutsideClick(false);
		this.setWidth("1100px");
		
		gridTarif.addThemeVariants(GridVariant.LUMO_COLUMN_BORDERS, GridVariant.LUMO_ROW_STRIPES, GridVariant.LUMO_COMPACT);

		// gestion colonnes grilles 
		Column<TarifT> colCodeFour = gridTarif.addColumn(tarif -> tarif.getTaktcode()).setHeader("Code fournisseur")
				.setWidth("120px");

		
		add(gridTarif);
		
		bt = new ButtonSteel("close");
		bt.addClickListener(event -> close());
		add(bt);
		
	}
	
	/**
	 * 
	 */
	public void loadgridTarif(ComposantT comp) {
		compCourant = comp;
		List<TarifT> listT = recupTarif();

		gridTarif.setItems(listT);
		
		if (listT.size() > 0)
			gridTarif.select(listT.get(0)); //this is the line that cause bug !!!!!
		
	}
	
	/**
	 * chargement de la grille des tarifs
	 */
	private List<TarifT> recupTarif() {
		List<TarifT> tarifs = new ArrayList<>();
		
		if (null != compCourant)
			tarifs = tarifRepo.findByTaktsocAndTaktgenreAndTaktcodartAndTaktcomart(SteelConstant.KTSOC, "2", compCourant.getArktcodart(),
					compCourant.getArktcomart());
		else
			tarifs =  new ArrayList<TarifT>();
		
		if (null == tarifs || null == tarifs.get(0))
		{
			return new ArrayList<TarifT>();
		}
		else
			{
			return tarifs;
			}
	}

and this is the code implement used when I double clicked on a grid row of my home page

DlgTest dlgtest = new DlgTest(argRepoComp, argtarifRepo);
		
		gridPrincipal.addItemDoubleClickListener(event -> {
			dlgtest.loadgridTarif(argRepoComp.findByidComposant(event.getItem().getIdComposant()));
			dlgtest.open();
		});

and the bean

public class TarifT implements java.io.Serializable {

	private String taktsoc;
	private String taktgenre;
	private String taktcode;
	private FournisT fournisTar;
	private String taktcodart;
	private String taktcomart;
	private String takttarif;
	private String takjapli;
	private Double tacnpu;
	private String tacntranch;
	private String tacjmaj;
	private String tactcommen;
	private String tactdevise;
	private String tactvalid;
	private Double tacnforfai;
	@Transient
	private LocalDate takjappliDate;
	private ParcoursCompV parcoursComp;
	
	
	public TarifT() {
		super();
		// TODO Auto-generated constructor stub
	}
	.......

I hope that help

I tried reproducing the problem with that code sample; I replaced the missing classes with dummy implementations the best I could, but I still didn’t manage to get that exception, sorry. I would suggest that you try to create a minimal sample that reproduces the issue without any non-Vaadin classes like ComposantTRepository, TarifTRepository, ComposantT, ButtonSteel etc. - these should not be related to the issue.

OK thank you for your help and your quick answer.
As soon I can I will try to create a minimal sample

I don’t understand why, but I haven’t the problem now.
Curious but there is no problem now .
Thank you for your help

Not a bad outcome, I suppose.