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.

[AutoComplete] Trigger option not working with required rule

See original GitHub issue

Version

2.11.0

Environment

Chrome 58.0.3029.110 (64-bit) on Windows 10

Reproduction link

https://codepen.io/anon/pen/gRPojd?editors=0010

Steps to reproduce

  1. Type something in the AutoComplete field
  2. Observe the field’s value change as you type
  3. (Optional: remove the required rule, and observe that the value does not change as you type)

What is expected?

The AutoComplete’s value should only change when an option is selected from the dropdown suggestion box because I set the trigger option to onSelect in getFieldDecorator’s options.

What is actually happening?

The value changes as soon as the user types something. But if you remove the required rule, it works as intended.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
WaldoJefferscommented, Jun 14, 2017

Thanks for your reply @benjycui, the workaround does work. I didn’t expect the value to be validated unless it has already been collected. Maybe validateTrigger should default to trigger’s value if it is not set by the user (which itself defaults to onChange). What do you think?

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

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to validate Autocomplete against suggested options?
I've built a custom validation rule according to my needs. SELECTBOX_VALUE: [ null, Validators.compose([ Validators.required, ...
Read more >
How You Add an Error Message Using Autocomplete Rules
You can't show an error with Business Object Defaulting or Field Modification rule types. This option is mostly available within a conditional statement....
Read more >
Autocomplete | Steps for Designing a Rule - YouTube
This video applies to Update 22B and later releases. In this video you will learn the steps for designing Autocomplete Rules.
Read more >
Auto-Complete Case Milestones - Salesforce Help
Create an Apex trigger that automatically marks milestones Completed on cases that match ... Knowledge: What's Different or Not Available in the Salesforce....
Read more >
Select | Quasar Framework
Customizing menu options. » Lazy loading. » Cover mode. The display value. Filtering and autocomplete. » Native attributes with use-input. Create new values....
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