Code Monkey home page Code Monkey logo

Comments (9)

vinodc avatar vinodc commented on June 4, 2024

Hi @lutherism . I might be misunderstanding, but wouldn't the current cancel and success event handlers be sufficient to close the shadow frame in? They are invoked when the modal is closed.

In addition, if you are calling choose() via JS, you can open the shadow frame before/after the call. If you are using choosify, just set a click handler on the element passed in to choosify to open the shadow frame instead.

Does this work?

from file-picker.

lutherism avatar lutherism commented on June 4, 2024

Thanks for the quick response :D.

Do you have a link to the 'close' event? There doesn't seem to be a 'close' event. We have put our UI cleanup in three events: 'cancel', 'success', and 'error', to cover all the close states we could find.

from file-picker.

vinodc avatar vinodc commented on June 4, 2024

Apologies I meant cancel instead of close. Edited my post above to reflect the correction. That is correct that there are three events you would want to catch to do cleanup in. I'll look into adding a separate close event to always trigger regardless of the reason for closing.

from file-picker.

lutherism avatar lutherism commented on June 4, 2024

Thanks. Yea adding that consistent event will make our code a lot easier to maintain.

from file-picker.

lutherism avatar lutherism commented on June 4, 2024

As for the choose hook, you're right it's not as necessary. But it would allow us to be less concerned with when/where we call explorer.choose();

IE, a page could create an explorer instance, then any number of subviews could call explorer.choose() without having to know the specifics of what the page wants to do in response.

from file-picker.

vinodc avatar vinodc commented on June 4, 2024

Whoops, accidentally closed. I always mistake that button for the Cancel button.

Adding open, close events.

from file-picker.

vinodc avatar vinodc commented on June 4, 2024

Added in 3a70c56. This will be released within the week.

from file-picker.

lutherism avatar lutherism commented on June 4, 2024

Brilliant. Thanks.

from file-picker.

vinodc avatar vinodc commented on June 4, 2024

This has been released.

from file-picker.

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.