Skip to content

Focus-components v0.6.2

Choose a tag to compare

@Bernardstanislas Bernardstanislas released this 25 Sep 18:53
· 2486 commits to master since this release

*** This release is mainly here to fix bugs. ***

There is no associated focusjs release.

How to install it npm install focusjs-components@0.6.2 --save && node scripts/install.js

Bug fixes

  • Display the error when the field is required #425

image

  • The HTML5 validation is now turned off with novalidate attribute on forms #423
  • The select now displays errors #428

image

  • Fix button material class #412
  • Date is fixed for the Day -1 problem , see here

New feature

image

  • autoCompleteFor is available in forms , please see
const codeResolver = code =>  {
    return new Promise(success => {
        const candidate = _.find(autocompleteData, {code});
        success(candidate ? candidate.value : 'Unresolved code');
    });
};

const searcher = text => {
    return new Promise(success => {
        _.delay(() => {
            const result = autocompleteData.filter(item => {
                return text === '' || item.value.toLowerCase().indexOf(text.toLowerCase()) !== -1;
            });
            success(result);
        }, 1);
    });
}

{this.autocompleteFor('city', {codeResolver, searcher}, {selectionHandler(data) {alert(`Code : ${data.code}, value: ${data.value}`)}})}
  • Add warning in lists when the data is not an array #418

Next release