question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

filterFormatted not working as expected

See original GitHub issue

Hi, When using a column filter (tried with a SelectFilter) and the property fileFormatted is set to true on column, the filtering is not working properly. Inspecting the code it seems that the targetVal is converted to lowerCase, but not filterVal, therefore there is no match if value has a capital letter. Version: 2.3.9

Somewhere in your code:

default:
  {
    if (filterObj[key].type === _Const2['default'].FILTER_TYPE.SELECT && filterFormatted && filterFormatted && format) {
      filterVal = format(filterVal, row, formatExtraData);
    }
    valid = _this4.filterText(targetVal, filterVal);
    break;
  }

where filterText function is defined as:

function filterText(targetVal, filterVal) {
      if (targetVal.toString().toLowerCase().indexOf(filterVal) === -1) {
             return false;
       }
      return true;
}

Regards.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
rvaldeolmilloscommented, Sep 5, 2016

Hi @AllenFang,

Checked with master branch and it’s still failing… I took the example from your own example /examples/js/column-filter/select-filter.js, just turning a capital letter in product qualities - the search flag is not important-, so it should be really easy to reproduce the problem.

0reactions
AllenFangcommented, Sep 11, 2016

@rvaldeolmillos, Fixed on v2.5.2. Thanks 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix D9.3 test failures - "FilterFormat label is expected ... - Drupal
When Token tests need to use FilterFormat entities, the tests create them like this: $this->testFormat = FilterFormat:: ...
Read more >
How to filter characters in an EditText - Stack Overflow
Found the problem. When the character is valid you just return null. Here is the working code: ... ICharSequence FilterFormatted(Java.Lang.
Read more >
Problem using a convolution filter formatted with a NHWC layout ...
Hi,. I would like to perform a 1D convolution with cudnnConvolutionForward(…) (with height always egal to 1). My data are described with the...
Read more >
Filters not working as expected - Microsoft Power BI Community
I have report which have a dropdown filter, wherever I select filter value which has data, I can see report getting filtered.
Read more >
[4.2] Fix deprecated warning for Calendar form fields on PHP ...
Try to edit article, change data of Created Date, make sure it is being saved properly (this is test for case filterformat is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found