textChange method
dynamic
textChange(
- dynamic text,
- Map item,
- BuildContext context,
- dynamic typeOwner,
- dynamic name,
- dynamic id,
Implementation
textChange(text, Map item, BuildContext context, typeOwner, name, id) {
myLogAll('textChange');
var value = getValue(name, item[gId], id)[gValue] ?? text;
Map lastFocusNode = getMap(_mFocusNode);
var selection =
(lastFocusNode[gSelection] ?? 0) + text.length - value.length;
setFocusOne(name, item[gId], id, typeOwner, context, selection);
if (item[gType] != gSearch) {
//if (!isNullID(id) || (typeOwner == gForm && item[gType] != gSearch)) {
//setTableValueItem(name, item[gId], id, text);
setValue(name, item[gId], id, text, context);
/*if ((typeOwner ?? '') == gForm) {
bool canEdit = false,
canDelete = true,
hasDetail = false,
isNotLog = false,
canCancel = true;
getTableFloatingBtnsDetail(
name, context, canEdit, canDelete, hasDetail, isNotLog, canCancel);
} else {
getTableFloatingBtns(name, context);
}*/
return;
}
if ((typeOwner ?? '') == gDroplist) {
dynamic dpid = name;
_dpListSearch[dpid] = text;
//myNotifyListeners();
return;
}
if (item[gDroplist] == '') {
item[gValue] = text;
}
item[gSearch] = text;
if (item[gType] == gAddress) {
return;
}
if ((item[gAction] ?? '') == '') {
return;
}
sendRequestOne(item[gAction], item, item[gContext] ?? context);
}