Hi Thierry,
I'm tearing my hair out with this wonderful new self completion control 😃)
When rowSource is a cursor, in a screen in private data session, how to make the list refreshed each time the screen is launched ?
In fact, if my cursor data changes, I can not update the search.
Should I run a jQuery command in the Refresh ()?
thank you in advance
As sometimes happens, the answer is in the question ...
In the refresh (), you just have to enter the wcHTMLGen () code as follows:
* Code repris de wcHTMLGen()
IF THISFORM.wBSlHTMLgen
if Reccount(this.RowSource_) < this.wACnLocalMax
wACcCandExpr = this.wACcCandExpr
wAClCandDesc = Iif(this.wAClCandDesc, 'DESC', '')
select &wACcCandExpr;
from (this.RowSource_);
order by 1 &wAClCandDesc;
into array aa
cScript = cLitteralJS(@m.aa, .T., .T.)
else
cScript = Textmerge([function(query, process){return jQuery.get('AJAXautoComp.<<m.toHTMLgen.oConfigApp.cApp>>?value=' + query + '&ObjAddr=<<URLEncode(this.wcID)>>', process)}])
endif
text to cScript textmerge noshow flags 1 pretext 15
jQuery('#<<this.wcID>>').typeahead({
minLength: <<this.wACnLengthMin>>
, highlight: true
, items: 'all'
, source: <<m.cScript>>
, sorter: function(items){!items.length && this.$menu.html(""); return items;}
, afterSelect: function(item){jQuery('#<<this.wcID>>').select()}
});
endtext
THISFORM.wcScriptJSadd(m.cScript)
ENDIF
Hi Vincent,
The only case where I see this potential issue is Reccount(this.RowSource_) < this.wACnLocalMax
, working with a local data source (created using JavaScript instead of querying the server).
Is it where you are?
Yes it is (for the moment, because th table will grow)