Skip to content

Examples

Mateusz Chrzonstowski edited this page Jan 6, 2017 · 9 revisions
  1. First source of the examples is the code repository itself. There is an examples directory from where each example can be started by npm start command after having all the dependencies. You can execute npm run build-all in the main directory in order to override dorf version in the examples with your current working copy. What is shown there:
  • simple - basic usage of dorf library; fields use css classes from the pure css library, form is for creating and updating and the Name field updates model immediately
  • extensions - modifications of the library and extraordinary functions from it
  • definition-extras - shows how to take advantage of the extras property from the field definition; properties defined there are available directly on field metadata. Example shows how to introduce fields ordering (mapper modification) and a placeholder (custom input field)
  • different-definition - simulates field definition got from e.g. a backend service. Mapper is extended for supporting mapping from this new definition to field metadata
  • new-field - shows how it is possible to add a new field taking advantage from DORF mechanisms
  1. Online examples - some examples from the repository converted to plunks.
Clone this wiki locally