Git Product home page Git Product logo

Comments (4)

joepavitt avatar joepavitt commented on August 26, 2024

Okay, so here you're injecting a timestamp, which is registered as an "invalid payload value", and reported as a warning in the debug console when running your flow.

If I remove the msg.payload it does run correctly and update live as expected.

Our check against the class value happens before the custom onInput handler that ui-switch has, and so the server-side store is updated, even though the msg never actually makes it to the client-side.

Not sure how I can handle this better, I can't move hte checks to after, as some custom event handlers send on messages, etc. so they'll never get to the remaining code

from node-red-dashboard.

joepavitt avatar joepavitt commented on August 26, 2024

We do not have good E2E test coverage on this topic though, so tomorrow morning I'll sweep across all of the widgets and ensure we have coverage to check for dynamic class injections

from node-red-dashboard.

TFisch64 avatar TFisch64 commented on August 26, 2024

Sorry, I did not pay attention to the debug console.
If I understand you correctly, the widget should ignore the unnecessary property ?

I changed the code to

var newMsg={};
newMsg.class ="my_switch_class";
return newMsg;

or

msg.class = "my_switch_class";
delete msg.payload;
return msg;

and it works as expected.

any idea howto change icon and icon color ?

from node-red-dashboard.

joepavitt avatar joepavitt commented on August 26, 2024

any idea how to change icon and icon color?

If you select "Custom Icon" in the config, you can control that here:

Screenshot 2024-05-24 at 08 20 37

from node-red-dashboard.

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.