angularjs - Angular Material and Handsontable -
i trying use handsontable angular , nghandsontable. there seems weird interaction, when dialog first appears see first column
then when select 1 of these cells:
and when item within row changed formatting after:
has seen similar , there can around apart form hacking css of handsontable?
js:
// nghandsontable vm.minsparerows = 1; vm.rowheaders = false; vm.db = { items: items }; vm.settings = { colheaders: true, contextmenu: ['row_above', 'row_below', 'remove_row'] }; // overflow ellipsis js vm.mycustomrenderer = function (hotinstance, td, row, col, prop, value, cellproperties) { var max_length = 4; if ((value + '').length > max_length) { value = value.substr(0, max_length) + '...'; } td.innerhtml = value; }
html:
<hot-table settings="vm.settings" row-headers="vm.rowheaders" min-spare-rows="vm.minsparerows" datarows="vm.db.items"> <hot-column data="id" title="'id'"></hot-column> <hot-column data="name.first" title="'first name'" type="'text'" read-only></hot-column> <hot-column data="name.last" title="'last name'" read-only></hot-column> <hot-column data="address" title="'address'" width="150"></hot-column> <hot-column data="product.description" title="'favorite food'" type="'autocomplete'"> <hot-autocomplete datarows="description in product.options"></hot-autocomplete> </hot-column> <hot-column data="price" title="'price'" type="'numeric'" width="80" format="'$ 0,0.00'"></hot-column> <hot-column data="isactive" title="'is active'" type="'checkbox'" checked-template="'yes'" unchecked-template="'no'"></hot-column> </hot-table>
you can fix if unwrap hansontable of md-content, don't know happen hansontable calculation when create table, md-content directive adds overflow cause weird behaviors
Comments
Post a Comment