npm handsontable 0.32.0-beta2

latest releases: 0.0.0-next-e32f4db-20240426, 0.0.0-next-9ed2854-20240426, 0.0.0-next-bc6e23d-20240425...
6 years ago

Breaking changes:

  • Changed the way in which custom cell types are being registered. (#4254)

As you already know from beta1 release, we have migrated from Traceur to Babel. It required from us to standarize the code so we decided to stop using a Handsontable global variable in our internal projects. As a result, we changed the way of creating custom editors, validators, renderers and their combinations like 'cell types'. In this beta2 release we improve the public API to give developers an ability to register cell behaviors and types separately. We strongly recommend to use a registered alias in Handsontable settings to increase the code maintainability.

An example on how to add a custom editor/renderer/validator:

Handsontable.cellTypes.registerCellType('my-custom-select', {
  editor: MyCustomSelectEditor,
  renderer: MyCustomSelectRenderer,
  validator: MyCustomSelectValidator, 
});

Handsontable.validators.registerValidator('credit-card', function(query, callback) {
  callback(/* passed `true` or `false` depending on a query value */);
});

new Handsontable(document.getElementById('element'), {
  data: data,
  columns: [{
    data: 'id',
    type: 'my-custom-select'
  }, {
    data: 'name',
    renderer: 'my-custom-select'
  }, {
    data: 'cardNumber',
    validator: 'credit-card'
  }]
})

Changes:

  • Fixed a wrong variable in a listener of the mouse wheel event (#4255)
  • Fixed an issue related to defining a cell metadata for non-existing cells (#4024)

The corresponding Handsontable Pro version is 1.11.0-beta2.

Don't miss a new handsontable release

NewReleases is sending notifications on new releases.