Perspective table cell question

Hello everyone,

I'am working on a project with touch screen, barcode and table.
Barcode input is in a table cell.
With start Up page event I can select a cell with a script:
self.getChild(Table).props.selection.selectedColumn = 'barcode'
self.getChild(Table).props.selection.selectedRow = 0

Can I make this cell also editable for not need to touch the cell?
(blinking cursor in the cell)

I've already done this with element .focus() with a few labels, but how with tables?

Thanks

Hello Kaloyan,

The table component requires an input to begin editing, this is chosen by the "allowEditOn" property. This property requires a "click" of some sort to edit the cell, as the properties of the table show below.
image

here i did something similar to use js injection to click a row

you can add in the column too to select the right column
(gotta click it twice too for edits)
something like this in the markdown binding

	
	code =  """<img style='display:none' src='/favicon.ico' onload=\"	
		document.querySelector('#"""+value.id+""" [data-row-id=&quot;"""+str(value.number)+"""&quot;][data-column-id=&quot;"""+str(value.column)+"""&quot;]').scrollIntoView();
		const cell = document.querySelector('#"""+value.id+""" [data-row-id=&quot;"""+str(value.number)+"""&quot;][data-column-id=&quot;"""+str(value.column)+"""&quot;] .content');	
		cell.click();
		cell.click();								
	\"></img>""".replace("\n", "").replace("\t", "")
	return code
		

dont let userinput enter these markdown bindings tho, its unsafe

1 Like

Now I'am using a external input txt element.
But I will try this.
Thanks.