Code Monkey home page Code Monkey logo

Comments (4)

datio avatar datio commented on May 22, 2024

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.

SBoudrias avatar SBoudrias commented on May 22, 2024

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.

GeorgeGkas avatar GeorgeGkas commented on May 22, 2024

@SBoudrias

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.

SBoudrias avatar SBoudrias commented on May 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.