Creating your own Node - where to add TypedInput on('change') event handlers
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 42/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- javascript
調査の方向性
docs/creating-nodes/properties.md の「Custom edit behavior」と、docs/api/ui/typedInput/index.md の「Methods」および「Disable state」付近を確認してください。ドキュメントに記載されている TypedInput の change-event のタイミングを、issue の oneditprepare の例と比較してください。ドキュメントで、ハンドラーがいつ TypedInput のメソッドを呼び出せるかを説明し、動作する例を含めていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
This issue is to suggest a couple of areas where documentation could be improved. Documentation is otherwise very good.
I haven't been able to find documentation for when in time to add a function to watch for change events as documented here. For example, to show/hide or enable/disable an HTML element based on a value of one of the Node properties.
Adding this within oneditprepare does not work ...
$('#node-input-instruction').on('change', (event, type, value) => {
if (value === 'turn_on') {
$('#node-wrapper-speed').typedInput('enable');
$('#node-wrapper-timeout').typedInput('enable');
} else if (value === 'turn_off') {
$('#node-wrapper-speed').typedInput('disable');
$('#node-wrapper-timeout').typedInput('disable');
}
});
... because you get an error since you can't call the typedInput function this early. Is there an official/recommended callback we should be using for once the UI has been setup (added to the DOM, or whaterver work you do)? In the meantime, I am setting hide/show directly on various elements, rather than using typedInput().
Can the documentation in Node Properties and/or TypedInput Widget be updated to make this easier to understand, to provide examples of method calls? Or maybe I've just missed something in the documentation.
If I am confused, maybe others are as well (or maybe they are better at reading documentation).
- 主要言語
- JavaScript
- スター
- 118
- フォーク
- 161
- 平均マージ
- 8時間 18分
- マージ済み PR(30日)
- 4
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
node-red/node-red.github.io のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
node-red/node-red.github.io#327 ·
-
docs/getting-started/local.md: npm command line is now deprecated, use --location=global not -g オープン
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
node-red/node-red.github.io#280 · コメント 1 件 ·
-
node-red/node-red.github.io#416 · リアクション 1 件 · 担当者 1 名 ·
-
難易度 1/5 1〜3時間 初心者へのやさしさ 50/100
node-red/node-red.github.io#384 ·
-
node-red/node-red.github.io#382 · コメント 1 件 · 担当者 1 名 ·
node-red/node-red.github.io の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
avniproject/avni-client#2135 ·
-
automated broken-link
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
agent/security hive/hosted-available-lke648397-260827-5n31 security
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
babalae/bettergi-scripts-list#3674 ·
-
A-Release-Notes C-Editing D-Modest S-Ready-For-Implementation
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
bevyengine/bevy-website#2595 ·