v7.3.0

GridResponsive
Mixin

Simplifies making grid responsive. Supply levels as responsiveLevels config, default levels are:

small
< 400px
medium
< 600px
large
> 600px

Columns can define configs per level to be resized etc:

let grid = new Grid({
  responsiveLevels: {
    small: 300,
    medium: 400,
    large: '*' // everything above 400
  },

columns: [ { field: 'name', text: 'Name', responsiveLevels: { small: { hidden: true }, '*': { hidden: false } // all other levels } }, { field: 'xx', ... } ] });

It is also possible to give a Grid state object instead of a level width, but in that case the object must contain a levelWidth property:

let grid = new Grid({
  responsiveLevels: {
    small: {
      // Width is required
      levelWidth : 400,
      // Other configs are optional, see GridState for available options
      rowHeight  : 30
    },
    medium : {
      levelWidth : 600,
      rowHeight  : 40
    },
    large: {
      levelWidth : '*', // everything above 300
      rowHeight  : 45
    }
  }
});

See also

  • Grid - The Grid widget
  • Column - Column configuration
No results

Configs

Configs are options you supply in a configuration object when creating an instance of this class

Properties

Properties are getters/setters or publicly accessible variables on this class

Functions

Functions are methods available for calling on the class
    • Find closes bigger level, aka level we want to use.

    Events

    Events are triggered for certain actions in this class and can be listened for to react to those actions in your code

    Event handlers

    Event handlers are callbacks called as a result of certain actions in this class

    Type definitions

    Source path

    Grid/view/mixin/GridResponsive.js

    Demo

    examples/responsive

    Contents