Material-table: When using lookup with integer value 0 the filtering returns empty results

Created on 25 Mar 2019  路  3Comments  路  Source: mbrn/material-table

Describe the bug
When defining a Material table with column lookup field which defines a key with integer 0 for filtering, the data is not properly filtered and ignores records with integer 0 on the relevant column. When using non-zero number or with the string '0' there is no problem.

To Reproduce
Steps to reproduce the behavior:

  1. Define a Material table is it appears in the example in https://mbrn.github.io/material-table/#/docz-examples-06-example-filtering
  2. Change the value of birthCity from 63 to 0 in lines 18 and 14, which is mapped to '艦anl谋urfa'
  3. Select the filter with option '艦anl谋urfa' on the column Birth Place
  4. No records are returned by the filter

Expected behavior
Data records with value 0 in the birthCity field should be seen in the table

Screenshots
image

Desktop (please complete the following information):

  • chrome Version 72.0.3626.121 (Official Build) (64-bit)
  • windows 7
bug

All 3 comments

Hi @kfirshahar ,

Thanks for clear description about but. I will resolve it asap.

This is done with 1.28.2

Hi @mbrn ,
Thanks for the quick fix, it works fine now :)

Was this page helpful?
0 / 5 - 0 ratings