javascript - Can I control handstontables autocomplete edtors initial value? -
with handsontable, use autocomplete columns let users choose list of pre defined names. when user selects name don't store name on data object, store id connected name. id available on data when table loaded initially.
this means need function go id name , vice versa have. use id name function in renderer , use name id function in beforechange, output contains id.
here problem:
if select cell name rendered , press enter, see id instead of name. there way can change behavior of editor name shown instead of id?
everything else seems work. if instance select cell , start typing, contains typed , autocomplete works expected. have same behavior when pressing enter on cell.
i ended using solution translation on data when loaded. when extract data sheet translate back.
i encountered similar problem date editor wanted go , forth between user date format , our normalized date format. handsons editors not easy work , date editor receives dates in different formats on setvalue.
the solution feels bit hacky @ same time there on these 2 occasions when data transformed makes less plausible there errors compared if transform on render, data entry, validation etc. solution know long in sheet, data user sees.
Comments
Post a Comment