GithubHelp home page GithubHelp logo

Comments (4)

jacklein avatar jacklein commented on May 29, 2024 1

@hello-ashleyintech ahhh ok thanks I will try this workaround 🙏

from bolt-js.

hello-ashleyintech avatar hello-ashleyintech commented on May 29, 2024

Hi, @jacklein! Thanks so much for submitting this question and for the video demonstrating your issue! 🙌

After doing some research on the select menu with external data types, it seems like the placeholder is only intended to surface when an option is not selected. In this case, an option is considered "selected" once you select it from the menu and from that point onwards you have no choice but to select another option to change the value in the field.

Something you could try is calling a views.update for your modal after hitting the "Add place" button that completely updates / replaces the form so it's fresh and new, but demonstrates all of your selected options below it like you've shown in the video.

I hope this helps! ✨

from bolt-js.

jacklein avatar jacklein commented on May 29, 2024

@hello-ashleyintech Thank you for the response! Sorry if I wasn't exactly clear up top, but I am calling views.update with a fresh external select block. However, the state object which has a selected_value from when I do the first select doesn't get reset and gets passed to the new modal. Because of this, the new external select block shows the previously selected value. I tried to pass a fresh state into the views.update like:

views.update({
   ...
   state: {},
   ...
})

but it doesn't seem like I can do this.

So ultimately I'm trying to reset the state variable when I call views.update.

from bolt-js.

hello-ashleyintech avatar hello-ashleyintech commented on May 29, 2024

Ah, I see! Thanks for the clarification @jacklein! 🙌

This may not be exactly what you want since it's not directly updating that state, but take a look at this suggestion and let me know if it would work in your use case!

from bolt-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.