GithubHelp home page GithubHelp logo

Comments (5)

fuggfuggfugg avatar fuggfuggfugg commented on September 21, 2024 1

I no longer have my code as I reverted my changes. But here was my use case. I was using render_async on my sidebar menu which has a list of menu items where a user can add/remove more menu items. The reason I use render_async so if the menus are toggled, I can refresh the sidebar without having to reload the page.

The sidebar however has javascript onHover that changes the width of the sidebar (Icons -> Icons with Text). CSS onhover can be used but I find a better implementation with JS and using HoverIntent

from render_async.

fuggfuggfugg avatar fuggfuggfugg commented on September 21, 2024

Also mention in passing any other options like
container_id: "sidebarRefresh" , html_element_name: 'ul', container_class: 'nav nav-tabs nav-stacked'
is also ignored

from render_async.

nikolalsvk avatar nikolalsvk commented on September 21, 2024

Hey, thanks for opening an issue.

This is an interesting problem. I am interested, are you using render_async with jQuery or with Vanilla JS? Here's how you can configure different options, just in case

from render_async.

nikolalsvk avatar nikolalsvk commented on September 21, 2024

But I think regardless of what you use, you are right:

Upon investigation, the code seems to only printing out the cached HTML.

I'd like to understand your use case, why do you need the JS portion of the gem if you're caching it? Are you expected to do some JS logic on every render?

from render_async.

nikolalsvk avatar nikolalsvk commented on September 21, 2024

Got it, thanks for sharing what you did. I'm glad you managed to make it work 🙌

But the issue you raised here is still valid - whether we should enable performing of cached JS response in render_async 🤔 If anyone has an idea on how to do it, please share below

from render_async.

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.