Make filters case insensitive

As of today, the filters on Forest are case sensitive.
It means that if you search for 'forest', 'Forest' wouldn't come up in the results.

‌If you prefer the search to be case insensitive, you can override the default operators we provide and change their behavior.

‌In this example, we want to replace the  contains  operator to make it case insensitive on a sequelize project.
We will then use the  Like  vs  iLike  operators.

‌You just have to add the following lines to your  app.js  file.

...

const Sequelize = require('sequelize');
const Op = Sequelize.Op;
const Operators = require('forest-express-sequelize/dist/utils/operators');

const operators = new Operators({sequelize:Sequelize});
operators.LIKE = Op.iLike;

...


Before



After