Clear method disabling new search action
See original GitHub issueVersion
1.1.0
Steps to reproduce
<AsyncTypeahead
options={this.props.communesOrPays}
onChange={function(e) {
this.props.onCommuneOrPaysUpdate(e);
//$('#communeorpays-reset').click();
//this.inputElement.click();
if (e.length) {
/**
* @property {Typeahead} typeaheadC
*/
this.refs.typeaheadC.getInstance().clear();
}
}.bind(this)}
onSearch={this.props.searchCommuneOrPays}
labelKey={this.props.formatCommuneOrPaysLabel}
disabled={!this.props.personnePhysique.pphDateNaissance}
ref="typeaheadC"
/>
{/* Can"t reset typeahead without disabling search?!!! */}
{/*<button*/}
{/*id="communeorpays-reset"*/}
{/*//ref={function(input) {this.inputElement = input;}.bind(this)}*/}
{/*className="hidden"*/}
{/*onClick={function() {this.refs.typeahead.getInstance().clear();}.bind(this)}>*/}
{/* */}
{/*</button>*/}
Expected Behavior
first search, selection and then click on an item. Input is cleared then when entering new search is triggered. Tried with a hard-coded button, works when user clicks on it but not when programmaticaly clicked (cf code ex)
Actual Behavior
first search works well, selection and then click on an item. Input is cleared but then when entering new search no request/search is triggered.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Modify or disable search actions available for contextual search
Search actions can be modified and disabled but not deleted and new actions cannot be created. Procedure. Navigate to All > Contextual ...
Read more >Manage & delete your Search history - Android - Google Support
Delete Search history saved to your Google Account. Manage Search settings like what activity Google saves and when Google auto-deletes your history.
Read more >Turn delete object and action query confirmation messages on ...
Turn off object deletion confirmation messages · On the File tab, click Options. · On the left side of the Access Options dialog...
Read more >Admin actions - Django documentation
If you need to disable a site-wide action you can call AdminSite.disable_action() . For example, you can use this method to remove the...
Read more >Support - Clear
Get answers to all of your CLEAR questions on enrollment, membership, locations, TSA Precheck, and more.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@BillOTei I have noticed that if you do
setTimeout(() => this.refs.typeahead.getInstance().clear(), 0);
it worksThis is fixed in v2.0.0-rc.1