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.

Virtual list - .trim is not a function

See original GitHub issue

This is a:

  • bug
  • Framework7 Version: 1.42.
  • Platform and Target: iOS Cordova + macOS Safari.

What you did

Trying to test out a search function, thought I’d use a virtual list + searchbar.

I’ve only used the basic example code and not (yet) customised any parameters to generate the virtual list:

var myList = myApp.virtualList('.list-block', {
    items: [1,2,3,4],
    height: 44
}); 

Expected Behaviour

The virtual list is populated

Actual Behaviour

If script is called before navigation has finished, navigation is aborted. If called after navigation is finished the list is populated with blank items. Either way console gives an error:

TypeError: o[w].trim is not a function. (In ‘o[w].trim()’, ‘o[w].trim’ is undefined)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
peterelcommented, Feb 7, 2017

Thanks 😃

0reactions
lock[bot]commented, Jun 25, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

javascript - .trim() is not a function - Stack Overflow
I have a very simple string that can contains a list which can possibly contain whitespace: string = ...
Read more >
[Solved] TypeError: trim is not a function - ItsJavaScript
The TypeError: trim is not a function occurs if we call a trim() method on the value that is not of a type...
Read more >
TypeError: trim is not a function in JavaScript | bobbyhadz
The "trim is not a function" error occurs when we call the trim() method on a value that is not a string. To...
Read more >
String.prototype.trim() - JavaScript - MDN Web Docs
The trim() method removes whitespace from both ends of a string and returns a new string, without modifying the original string.
Read more >
Why is Node.js trim() not a function (JavaScript, node ... - Quora
The trim() function is a string function of Node.js which is used to remove white spaces from the string. Syntax: [code]string.trim() [/code]Parameter: This ......
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