Comments (4)
What a great idea! It'd be awesome if we could display loading indicators using the fired events.
Is it currently possible to disable/pause the user input until a check is performed (e.g. the async version check example in the yeoman link above)?
With lengthy actions that need to be completed before allowing the user to get to the next step, it is beneficial to display loading indicators or other dynamic updates.
from inquirer.js.
Is it currently possible to disable/pause the user input until a check is performed (e.g. the async version check example in the yeoman link above)?
The best way is to nest calls to Inquirer. So you make your first call, get user feedback and handle it in the callback. If you then need to make async actions, do them (display a loader with some other Inquirer UI who're not the prompt
UI), once its down, prompt the user with a new prompt session.
Basically, the use case you ask for won't be implemented as programmatic re-rendering and I don't think it need another API. The current way to do it seems reasonable to me.
from inquirer.js.
This issue was created 5 years ago. This was being addressed in #289, but @dthree canceled it. The proposed API was implemented in Vorpal as I read on #289 (comment), but not addressed at Inquirer in that time.
The current version of Inquirer (6.2.0 as seen in package.json) gives the option through Reactive Interface to dynamically handle question prompts. Is that the case we tried to accomplish when the issue was first introduced? If that's that case we can safety close this issue, else more investigation has to been done.
from inquirer.js.
Hum, we never really implemented this in core. I think it's fair to close it as there's no plan to make this work right now - and I don't think there's an easy win here.
Maybe if we ever get done with the refactor idea then it'd be a good time to revisit.
from inquirer.js.
Related Issues (20)
- Feature request: Support for "done" callback for all prompt types HOT 4
- Preload input with suggestive text, allow the user to edit. HOT 3
- Feature request: Native filter API for select HOT 1
- Checkbox instructions disappears on space selection HOT 2
- The dist files for CommonJS are not correct HOT 2
- Downgrade or use multi-version for those pure ESM packages HOT 6
- Cannot find package '@inquirer/prompts' HOT 3
- Checkbox default selection HOT 3
- Does `select` in @inquirer/prompts support separators? HOT 5
- Allow prompts to keep their current content on validation error HOT 3
- Remove unused dependencies HOT 1
- Package is wrongly configured for TS Node16 resolver
- CLI cursor missing after force quit
- inquirer/confirm accepts more than just 'Y' and 'n' answers. HOT 3
- Typescript build issues HOT 7
- Error in transformer when using default exits silently (version 8)
- How do I force a re-render from inside the context of createPrompt? HOT 2
- Combine multiple state updates into a single operation to reduce renders HOT 2
- State system should not force a render when the new value is the same as the previous value
- A declaration file cannoty be imported without 'import type'. Did you mean to import an implementation file instead? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from inquirer.js.