Focus-components 2.2.0
Breaking Changes:
- #1412 #1414 SelectCheckbox have a new behaviour for onChange (the old one can be obtained with legacyOnChange props to true)
- Store change mixin : function onChange has been renamed to onStoreChange
- i18next-client dependency should be removed
- i18n now handle namespaces. If server error messages have a
:
then it is truncated to the part after:
- i18n now handle namespaces. If server error messages have a
Features :
- [NEW COMPONENT] Autocomplete select multiple : autocomplete with chip, for multiple selection
- [NEW COMPONENT] Autocomplete select reference : easy autocomplete based on reference list
- [NEW COMPONENT] RichTextEditor: fully customisable text editor
- [NEW COMPONENT] Lazy behaviour : Component can now easily be lazy-loading with this
- Re-writing all code in ES6
- Unit testing migrated in jest
- Advanced search : can now have several stores/advanced search properly separed
- Search Header : Change cartridge conf of advanced search dynamically
- Reference-behaviour : do not reload reference list if not needed
- Store-connector : now gives isLoading props + better event handling when not mounted
- Fixing .scss handling : focus now exposes one scss file (no more modification of MDL variables)
- Form and store-behaviour : Better handling and reset, new options added
Fixes :
- Fixes on autocomplete (keyResolver, better willReceiveProps handling, clean up, turn off navigator autocomplete, ...)
- Autocomplete : clearOnNullValue now really clears input after selection
- #1439 #1440 SelectRadio : problem with first render on firefox
- #1411 #1415 Store change mixin : event was triggering onChange, now triggering onStoreChange (rename)
- #1416 #1424 Dropdown button is now a type button and not submit
- #1399 #1400 Tooltip now can have additional classnames
- #1404 #1417 Wrong interaction between form and reference mixin
- #1394 Fixing issue with header position
- #1395 FacetBox : fixing missing initial assignement
- Fixing store connector/behaviour
- Store change mixin should only update the modified node
- Correcting missing or wrong React import on application/menu and common/panel
- remove unused export in validation-mixin
- fix behavior for store-behavior
- give a function to store-connector
- fix message center
Autocomplete mutiple
Available there
Take the same props as autocomplete select, only difference is that the value manipulates is an array of keys
Autocomplete reference
Available there
Take 4 props
- referenceName : list of the reference name
- keyName : name of the code/id fieldname in the reference list object
- labelName: name of the labelName fieldname in the reference list object
- multiple : if the selection is multiple or not.
- all of default props (value, onChange, isEdit, ...)
The search is done while ignoring case and diacritics on label.
Else, classic input use (give value and onChange, if the default ones from form are not good enough)
RichTextEditor
Available there
One special props :
- language : (can be either 'html' or 'markdown', default to markdown) markup to use in the value returned
- all of default props (value, onChange, isEdit, ...)
Classic input use (give value and onChange, if the default ones from form are not good enough)
LazyBehaviour
Available there
This can be used to wrap a component, and make it lazy (will not be loaded/mounted until on screen).
Store-behaviour
Available there
- Default load action has been moved to willMount, instead of didMount
- Will now update only modified and listened nodes in store
- Will try to use default data if store is empty, or if
definitionInNode
is defined (will merge it then node is updated then) - For better default data use, please fill
this.definitionInNode
in form, with the name of the node containing your form values - Default data behaviour can be overriden using
this.getDefaultStoreData
. This method must return an objet with format like
{
node1: { //default node1 data },
node2: { //default node2 data}
}