FlowFuse / FlowFuse/node-red-dashboard

A couple of questions about ui_base.js

Open
#1,068 2 comments 0 reactions 0 assignees View on GitHub
needs-triage
Dominant language
HTML
Stars
355
Forks
82
Avg merge
4d 23h
Merged PRs (30d)
24

Description

Hi guys,

I was browsing through the ui_base.js code, in order to gain some understanding to fill my knowledge gaps.
But there are a couple of things that are not clear to me:

1. The [defaultHandler](https://github.com/FlowFuse/node-red-dashboard/blob/main/nodes/config/ui_base.js#L632) for the `onSend` event has a "value" input parameter is not used. I did not have a look at what this code is supposed to do by default, but it looks like a bug to me.

2. When there is no passthrough property, in the [else](https://github.com/FlowFuse/node-red-dashboard/blob/main/nodes/config/ui_base.js#L980) statement the message is being send anyway. I might be mistaken, but that looks weird to me. Would be nice if a comment could be added to the code, to explain why this is required.

3. In the code a few times a defaultHandler is being used, in case the widget itself does not provide a custom handler. But only for the `onInput` event there is an [else](https://github.com/FlowFuse/node-red-dashboard/blob/main/nodes/config/ui_base.js#L968) statement, so imho it would be more clear for contributors if this else statement code snippet would be wrapped into a defaultHandler function.

Thanks!!
Bart

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.