Add optional initial_query to suggester#1139
Conversation
|
Could you also update the docs as part of this PR? |
|
Can someone remind me how this is different from placeholder? Also, for conformity, should we rename it to |
My understanding is that This way if I press enter as soon as the prompt appears, I'll select "3: Medium" as priority instead of "1: Highest" as currently. This saves two keypresses in the average case and four keypresses in the worst case, which can add up quickly when, say, adding a ton of task notes. Don't suppose there's any chance this will make its way into main any time soon btw? |
|
Cleaning up stale PRs. |
|
@Zachatoo Can I do something for it to be reopen and merged? |
If you can do at least 1 and 2 I'll accept this. 3 would be nice but not required, I'll do it if you don't. |
|
Sure, I will do all 3 |
|
@Zachatoo ready to review |
| super(app, textInputEl); | ||
| limit && (this.limit = limit); | ||
| if (default_value) { | ||
| this.setValue(default_value); |
There was a problem hiding this comment.
This doesn't appear to be working as expected, the user still has to select the option for it to work for the multi-suggester.
IMO we should pass an array of options in the template as the default values and have them pre-selected, instead of just setting the input value.
|
@Zachatoo ready for review |
* Add optional initial_query to suggester * feat: rename default_value * feat: add to multi suggester * docs: add documentation * feat: init multi-suggest with multiple default values * feat: init suggester with default value * refactor: remove unused init logic * docs: update * Apply suggestion from @Zachatoo --------- Co-authored-by: Zach Young <6936914+Zachatoo@users.noreply.github.com>
Fixes #555