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.

on-search-change event is not that useful

See original GitHub issue

As I’m using on-search-change event, the main intention is to load options from the server. But it doesn’t suit the task. Here’s why.

on-search-change event triggers:

  1. Page ready.
  2. Parent selected prop externally changed.
  3. User clicked on component (triggers 2 times).
  4. User types any letter

load-options event should trigger:

  1. User clicked on component (once).
  2. User types any letter

This is okeyish when you have one select on page. And not so much with ton of forms.

Hence, I humbly propose to deprecate on-search-change and implement load-options. And I’m willing to shoulder the task if help is wanted.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
asvaecommented, Jul 13, 2016

@dobromir-hristov

How do I know from where the change event is fired?

Like this, I guess? Template:

<vm-component
    @on-change="process"
></vm-component>

Script -> methods:

process (event){
    // do stuff with event
}

And you also can

<vm-component
    @on-change="process($arguments[0])"
></vm-component>

and pass the data object from the select

0reactions
shentaocommented, Jul 31, 2016

@dobromir-hristov @asvae Fixed in v1.0.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Working on react app and keep on getting the error Expected ...
Your Searchbox component isn't destructuring the props : const Searchbox = (searchfield, onSearchChange)=>.
Read more >
[EuiComboBox] Selecting an option retriggers search with
So basically you want to check if the search value actually changed, and not fire onSearchChange event if so?
Read more >
React Tutorials — The Basics. Controlled Forms - Medium
Note: the event listener must be called onSearchChange! Now still the MainContainer, where state is, create the searchUpdate function as ...
Read more >
Getting started with React SyntheticEvent - LogRocket Blog
React SyntheticEvent is a unified cross-browser wrapper around the browser's native events that prevents browser inconsistencies.
Read more >
onsearch Event - W3Schools
Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, Python, PHP,...
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