Monday 6th January, 2025

Editor 2.4.0 release notes

A big update for Editor, with the headline feature being built in auto-complete support through the new autocomplete and tags built-in field types. These field types compliment the existing ones, and are very useful for cases where you want to provide predefined options, but also allow extra flexibility. The server-side libraries (.NET, PHP and Node.js) all have full support for these new field types.

There are a number of other new features such as i18n.field, easier integration with Bootstrap and other styling frameworks, support for Bulma dark mode and much more. For full details, please see the release notes below.

Downloads

Downloads of specific versions of Editor are only available to license holders. Please see the download page for information about the current release version.

Release notes

Core

New

  • autocomplete field which can be used to provide a list of options for a text input field for fast data entry.
  • tags field type which is a cross between an autocomplete and a select list. A drop down shows a list of options that a user can add to a collection of tags.
  • i18n.field language object which holds the defaults for the strings used by the various field types. This allows full translation through a single language object or Ajax loaded file.
  • i18n.field.upload and i18n.field.uploadMany language objects, providing the default strings for the upload field types. This can be overridden as before on the configuration object for the field, but now it is also possible to set them as part of the language object, including having it load from the DataTables Ajax language file.
  • field().submittable() method to be able to dynamically change the submit flag for a field (fields.submit).
  • field().type() method to get the field type as a string
  • i18n() method for accessing Editor internationalisation records
  • dependent() will be triggered when multi-row editing and multiple different values exist for a field. Previously dependent would only trigger if the values all matched. Note that the value for the field passed in to the callback function is undefined. You may wish to use the multi-row editing API if this is a situation that your program might encounter and need to handle.
  • insertPoint option for bubble() to tell Editor where to insert the bubble node.
  • Bootstrap and Foundation integration can work with DataTable.use() to get the styling library (i.e. the modal). This requires DataTables 2.2.0 or newer.
  • During file upload the field will show its processing indicator
  • Integration with Bulma 1.0, including support for dark mode
  • Options for fields are updated automatically if included in the JSON response for Editor Ajax actions.
  • When nested editing, the form title will now reflect that you are editing multi-layers deep to give the end user an indication that they are in a nested editor.
  • Form can be left in its state after submission through the onComplete option of form-options or the hide parameter of submit().

Fixes

  • Editor requires at least DT 1.11.
  • SCSS 1.77.7 compatibility
  • Demos - MySQL tables now explicitly use utf8mb4
  • dependent() callback was being triggered twice when starting a create action.
  • dependent() was being triggered when options were loaded (typically on page load), but no form was active.
  • inlineCreate() would trigger a change event twice on fields when called.
  • datatable would throw an error if performing nested editing on a non-Ajax table.
  • Field processing indicator was misaligned when used with Bootstrap 5
  • getFormatter was not being used for multi-row editing
  • If a field is hidden due to a dependent() action and gains focus at the same time, focus will automatically be moved on to the next field, rather than leaving focus on a now hidden field.
  • If an array data source is used for the DataTable rows, Editor should work with arrays as well, rather than an object with number properties.
  • If a template element is not found, don't attempt to append to it
  • Include Typescript defs for the buttons that Editor provides for the DataTables "Buttons" extension.
  • jQuery UI integration displayNode() now returns the modal, rather than the scrolling container inside it. This is consistent with the other styling integrations.
  • Multiple row editing information text was not translatable
  • New rows didn't have a "flash" to indicate the row that was just created (matching the flash of a row after edit).
  • Reference API docs redirects in HTML rather than Nginx
  • Remove for attribute on the label element for a hidden field type as there is no matching input in the DOM.
  • Select2 was not working if added in an init* event.
  • Use field().input() to get the element to focus on, rather than assuming input, textarea or select.
  • When resembling the DOM structure, do so with the header and footer as well. Semantic UI specifically needs this when editing a second row without closing the modal.
  • When server-side processing and KeyTable with editOnFocus enabled, only every second cell would be editable when tabbing through a table.
  • When using arrays inside a nested object, on edit the array wouldn't be fully replaced (as it would be at the top level).
  • Bulma when used with a modal and triggering editing again without closing the modal would duplicate the close icon at the top.
  • Bulma - error styling could apply to the whole field (if in an error state), rather than just the error message.

Examples

  • New examples for autocomplete
  • New examples for tags
  • New example showing "create and add another" for data entry
  • New example showing dropdown control in the table for editing control
  • Create a new "triggering" group of examples showing different ways in which editing can be triggered.
  • Correct comment syntax in MySQL demo file
  • Tweak the SQL order for MySQL to drop in sequence if rebuilding the demo database
  • Import / export shouldn't include the footer

.NET

New

  • Add a .NET8 target
  • Ability to run global validators after field validation. Previously the global validator would run before the field validation, but now it is possible to also run validators after. This is done by passing true as the first argument to the Editor.validator() method and then the validation function as the second parameter. The original behaviour is maintained when either false is given as the first parameter, or if the validation function is given as the first parameter (i.e. a new overload has been introduced).
  • Mjoin can now operate off data points which have been LeftJoined.
  • Mjoin now supports EditorIgnore, EditorGet and EditorSet attributes for models, matching the capabilities of the core Editor class.
  • new Options() can now be passed parameters for easy creation of options without needing the chained methods, for the most simple of use cases.
  • Options class can have ordering completely disabled by passing false to the Order() method.
  • Support for autocomplete and tags via the Options class

Updates

  • AspNetCore includes for .NET8 - NETSDK1080 error

Fixes

  • Compatibility with Npgsql 6+
  • Server-side processing with SQL Server would give an error when entering into the neutral sort (i.e. third click of a column header
  • Use of .Split(char) was causing an error in .NET Framework

Node.js

New

  • Ability to run global validators after field validation. Previously the global validator would run before the field validation, but now it is possible to also run validators after. This is done by passing true as the first argument to the Editor.validator() method and then the validation function as the second parameter. The original behaviour is maintained when either false is given as the first parameter, or if the validation function is given as the first parameter.
  • new Options() can now be passed parameters for easy creation of options without needing the chained methods, for the most simple of use cases.
  • Options class can have ordering completely disabled by passing false to the order() method.
  • Support for autocomplete and tags.

New

  • Options class now considers add()ed options for search, limit and ordering.
  • Server-side processing with SQL Server would give an error when entering into the neutral sort (i.e. third click of a column header)

PHP

New

  • Ability to run global validators after field validation. Previously the global validator would run before the field validation, but now it is possible to also run validators after. This is done by passing true as the first argument to the Editor->validator() method and then the validation function as the second parameter. The original behaviour is maintained when either false is given as the first parameter, or if the validation function is given as the first parameter.
  • List of options is returned after create and edit commands, to allow new options created from the action to be included in the lists. New: If this behaviour is not desirable (as it is an extra query), the Field->alwaysRefresh() method can be used to disable it.
  • new Options() can now be passed parameters for easy creation of options without needing the chained methods, for the most simple of use cases.
  • Options class can have ordering completely disabled by passing false to the order() method.
  • Support for Editor's new options search command
  • Support for including database columns other than the label and value in Options response

Fixes

  • Compatibility with PHP 8.4
  • Consistent code style with CS Fixer
  • Many (but not all, yet) PHPStan level 6 warnings
  • Options class now considers add()ed options for ordering, filtering and limiting.
  • PHP 8.3 deprecation error for strcmp with a null second argument
  • Server-side processing with SQL Server would give an error when entering into the neutral sort (i.e. third click of a column header)