Skip to main content
added 9 characters in body
Source Link
Kris Goncalves
  • 22.8k
  • 8
  • 35
  • 72

Here's the link to the similar question How to filter Data in dataTable lwc based on the input in search bar?

The above works fine with non-lookup fields but doesn't seem to be working in my case.

Edit : If I use regex.test(row.Name)regex.test(row.Name), I'm able to search the records based on Name column however, one of my columns has fieldName: Owner.NamefieldName: Owner.Name and the search isn't working. Error: [Cannot read properties of undefined (reading 'Name')]

Error: [Cannot read properties of undefined (reading 'Name')]

.js code snippet:

updateSearch(event) {
     var regex = new RegExp(event.target.value, 'i')
     this.data = this.testSearch.filter(
        row => regex.test(row.Owner.Name) 
    );
updateSearch(event) {
     var regex = new RegExp(event.target.value, 'i')
     this.data = this.testSearch.filter(
        row => regex.test(row.Owner.Name) 
     );      

Any idea on above?

Here's the link to the similar question How to filter Data in dataTable lwc based on the input in search bar?

The above works fine with non-lookup fields but doesn't seem to be working in my case.

Edit : If I use regex.test(row.Name), I'm able to search the records based on Name column however, one of my columns has fieldName: Owner.Name and the search isn't working. Error: [Cannot read properties of undefined (reading 'Name')]

.js code snippet:

updateSearch(event) {
     var regex = new RegExp(event.target.value, 'i')
     this.data = this.testSearch.filter(
        row => regex.test(row.Owner.Name) 
    );

Any idea on above?

Here's the link to the similar question How to filter Data in dataTable lwc based on the input in search bar?

The above works fine with non-lookup fields but doesn't seem to be working in my case.

If I use regex.test(row.Name), I'm able to search the records based on Name column however, one of my columns has fieldName: Owner.Name and the search isn't working.

Error: [Cannot read properties of undefined (reading 'Name')]

.js code snippet:

updateSearch(event) {
     var regex = new RegExp(event.target.value, 'i')
     this.data = this.testSearch.filter(
        row => regex.test(row.Owner.Name) 
     );      

Any idea on above?

added 63 characters in body
Source Link

Here's the link to the similar question How to filter Data in dataTable lwc based on the input in search bar?

The above works fine with non-lookup fields but doesn't seem to be working in my case.

Edit : If I use regex.test(row.Name), I'm able to search the records based on Name column however, one of my columns has fieldName: Owner.Name and the search isn't working. Error: [Cannot read properties of undefined (reading 'Name')]

.js code snippet:

updateSearch(event) {
     var regex = new RegExp(event.target.value, 'i')
     this.data = this.testSearch.filter(
        row => regex.test(row.Owner.Name) 
    );

Any idea on above?

Here's the link to the similar question How to filter Data in dataTable lwc based on the input in search bar?

The above works fine with non-lookup fields but doesn't seem to be working in my case.

Edit : If I use regex.test(row.Name), I'm able to search the records based on Name column however, one of my columns has fieldName: Owner.Name and the search isn't working.

.js code snippet:

updateSearch(event) {
     var regex = new RegExp(event.target.value, 'i')
     this.data = this.testSearch.filter(
        row => regex.test(row.Owner.Name) 
    );

Any idea on above?

Here's the link to the similar question How to filter Data in dataTable lwc based on the input in search bar?

The above works fine with non-lookup fields but doesn't seem to be working in my case.

Edit : If I use regex.test(row.Name), I'm able to search the records based on Name column however, one of my columns has fieldName: Owner.Name and the search isn't working. Error: [Cannot read properties of undefined (reading 'Name')]

.js code snippet:

updateSearch(event) {
     var regex = new RegExp(event.target.value, 'i')
     this.data = this.testSearch.filter(
        row => regex.test(row.Owner.Name) 
    );

Any idea on above?

added 141 characters in body
Source Link

Here's the link to the similar question How to filter Data in dataTable lwc based on the input in search bar?

The above works fine with non-lookup fields but doesn't seem to be working in my case.

Edit : If I use regex.test(row.Name), I'm able to search the records based on Name column however, one of my columns has fieldName: Owner.Name and the search isn't working.

.js code snippet:

updateSearch(event) {
     var regex = new RegExp(event.target.value, 'i')
    // console.log(regex);
     this.data = this.testSearch.filter(
        row => regex.test**test(row.Owner.Name)** 
    );

Any idea on above?

Here's the link to the similar question How to filter Data in dataTable lwc based on the input in search bar?

The above works fine with non-lookup fields but doesn't seem to be working in my case.

.js code snippet:

updateSearch(event) {
     var regex = new RegExp(event.target.value, 'i')
    // console.log(regex);
     this.data = this.testSearch.filter(
        row => regex.test**(row.Owner.Name)**
    );

Any idea on above?

Here's the link to the similar question How to filter Data in dataTable lwc based on the input in search bar?

The above works fine with non-lookup fields but doesn't seem to be working in my case.

Edit : If I use regex.test(row.Name), I'm able to search the records based on Name column however, one of my columns has fieldName: Owner.Name and the search isn't working.

.js code snippet:

updateSearch(event) {
     var regex = new RegExp(event.target.value, 'i')
     this.data = this.testSearch.filter(
        row => regex.test(row.Owner.Name) 
    );

Any idea on above?

Source Link
Loading