xOnXCell_Edit_SubmitValue_INTERNAL method

dynamic xOnXCell_Edit_SubmitValue_INTERNAL(
  1. XFDataItem itemInEdit,
  2. XCol xCol,
  3. dynamic newValue, {
  4. dynamic valueForResolved = null,
  5. dynamic valueForRealCol = null,
})

valueForRealCol = value da mettere nella col reale: es artID noi abbiamo sempre colKey = artiID_resolved, la RealCol

Implementation

xOnXCell_Edit_SubmitValue_INTERNAL(XFDataItem itemInEdit, XCol xCol, dynamic newValue, {dynamic valueForResolved = null, dynamic valueForRealCol = null}) {
  var valueIsChanged;
  itemInEdit.isModified = true;
  calcRow(itemInEdit);
  setState(() {
    changed_Data = true;
    widget.edited!.value = true;
  });
  if (liEditedItems.any((element) => element.id == itemInEdit.id).not()) {
    liEditedItems.add(itemInEdit as K);
  }
  if (newValue != null && newValue is XEnumDef)
    valueIsChanged = itemInEdit[xCol.colKey] != (valueForRealCol ?? newValue.value ?? 0);
  else
    valueIsChanged = itemInEdit[xCol.colKey] != (valueForRealCol ?? newValue);
  xOnXCell_Edit_BeforeSubmit(itemInEdit, xCol, newValue, valueIsChanged, valueForResolved: valueForResolved, valueForRealCol: valueForRealCol);
  xOnXCell_Edit_SubmitValue_ToItem(itemInEdit, xCol, newValue, valueIsChanged, valueForResolved: valueForResolved, valueForRealCol: valueForRealCol);
  xOnXCell_Edit_AfterSubmit(itemInEdit, xCol, newValue, valueIsChanged, valueForResolved: valueForResolved, valueForRealCol: valueForRealCol);
  // widget.rootItemEdited!(itemInEdit as K);
  // xOnXCell_Edit_SubmitValue_INTERNAL(item, xCol, item[xCol.colKey]);
}