Skip to content

Releases: react-form-fields/material-ui

Material UI 4

25 Jul 19:09
Compare
Choose a tag to compare

BREAKING CHANGES

Support for material-ui@4

New Editor: Trumbowyg

10 Apr 16:30
Compare
Choose a tag to compare

Breaking Changes

https://alex-d.github.io/Trumbowyg

Due facebookarchive/draft-js#1895 we decided to move away from draftjs for now. The props of FieldHtml didn't change only the global config.

New Config Example:

import ConfigBuilder from '@react-form-fields/material-ui/config/builder';
import { setConfig } from '@react-form-fields/material-ui/config';

const config = new ConfigBuilder()
   .setTrumbowygLocale(() => import('trumbowyg/dist/langs/pt_br.min.js'))
   .setTrumbowygPlugins(() => [
          import('trumbowyg/dist/plugins/history/trumbowyg.history.min.js'),
          import('trumbowyg/dist/plugins/cleanpaste/trumbowyg.cleanpaste.min.js')
   ])
  .setTrumbowygConfig({ // <~ any Trumbowyg options
        btns: [['strong', 'em',], ['insertImage']],
        autogrow: true
  })
 .build()

setConfig(config);

Default Plugins Loaded:

  • history
  • cleanpaste

Lang pt-br already load the right locale

Partial Draftjs Android Support

28 Mar 20:08
Compare
Choose a tag to compare

New Autocomplete component

21 Mar 14:53
Compare
Choose a tag to compare

Breaking changes

Change autocomplete component from react-autosuggest to react-select. Only the specific props will be affect.

<FieldAutocomplete
   label='Autocomplete'
   helperText='If you try to '
   name='autocomplete'
   value={model.autocompleteId}
   validation='required'
   options={[{ value: 1, label: 'Auto 1' }, { value: 2, label: 'Auto 2' }, { value: 3, label: 'Auto 3' }]}
   onChange={(v => this.setState({ model: { ...model, autocompleteId: v } }))}
 />

Bug Fixes + Improvement

21 Mar 13:23
Compare
Choose a tag to compare

Bug fixes

  • Html editor: Placeholder still shows when creating list:
    image

  • Html editor: Output is different from editor:
    image

Improvements

  • Color: better color value indicator:
    image

Update Core

11 Mar 20:50
Compare
Choose a tag to compare

HTML editor and bugfixes

16 Jan 12:37
Compare
Choose a tag to compare
  • New HTML Editor:
<FieldHtml
  label='Descrição'
  value={model.description}
  onChange={html => this.setState({ html }) }
  validation='required'
/>

You can pass toolbar as a prop or set through config.

// App.jsx
<FormFieldsContext config={{
    editorLocale: 'pt',
    editorToolbar: {
      inline: { options: ['bold', 'italic', 'underline'] },
      list: { options: ['unordered', 'ordered'] }
    },
    validation: validationMessage
  }}>
 // ... your app
</FormFieldsContext>
  • New config props: editorLocale and editorToolbar.

Bugfixes

  • Select now return null value when emptyOption is selected.
  • Select now allow to set an option with value 0.
  • All helperText now allow pass elements as value.

Update material-ui-pickers

04 Jan 14:34
Compare
Choose a tag to compare

Breaking change

Add FormFieldsContext in your App (Root) component, see more in config section.

See Config Section

Update Core and Typings

17 Dec 19:08
Compare
Choose a tag to compare

No Breaking changes

Use Select instead of TextField

04 Dec 13:30
Compare
Choose a tag to compare

Breaking Changes

Use Select instead of TextField, all props must be equals to Select from material ui and the prop emptyOption a string with the message of the empty option.