updates to a Input's disabled property causes the value property to reset
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 72/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- javascript, typescript
- 領域
- frontend
調査の方向性
Start by reproducing the behavior in the linked Solid playground, comparing the four input cases when you edit their values and toggle disabled. Then trace how Solid updates input properties in its DOM rendering code and find the relevant tests. Done means toggling disabled does not reset an edited value when value is reactive, with the other cases still behaving as expected.
索引モデルが issue の本文から書いたものです。
説明
When both the disabled and value property of an input are signals, changes to the disabled property causes the value to reset to its initial value even after being modified.
Is this expected behavior?
Below is both code and a playground link. Just change the values in the four boxes and then click "CLICK ME".
https://playground.solidjs.com/MattLysinger/6fabf761-9664-462b-a96e-2e5f82c3b3f3
import { render } from "@solidjs/web";
import { createSignal } from "solid-js";
function Counter() {
let ref1!: HTMLInputElement;
let ref2!: HTMLInputElement;
const [disabled, setDisabled] = createSignal(false);
const [value, setValue] = createSignal(11);
return (
<>
<button
type="button"
onClick={() => {
setDisabled((x) => !x);
ref1.disabled = !ref1.disabled;
ref2.disabled = !ref2.disabled;
}}
>
CLICK ME
</button>
<p>1. disabled & value are both signals and the disabled signal is toggled</p>
<input disabled={disabled()} type="number" value={value()} />
<p>2. disabled is a signal and value is a number and the disabled signal is toggled</p>
<input disabled={disabled()} type="number" value={11} />
<p>3. value is a signal and the disabled property is directly toggled</p>
<input ref={ref1} type="number" value={value()} />
<p>4. value is a number and the disabled signal is directly toggled</p>
<input ref={ref2} type="number" value={11} />
</>
);
}
render(() => <Counter />, document.getElementById("app")!);
Originally posted by @MattLysinger in https://github.com/solidjs/solid/discussions/4496
- 主要言語
- TypeScript
- スター
- 36.2k
- フォーク
- 1.1k
- 平均マージ
- 9時間
- マージ済み PR(30日)
- 463
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
solidjs/solid のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 54/100
メンテナーはふだん 1 日以内に返信
-
`<style>` and `<script>` children inside MathML are not escaped in SSR (and static DOM templates), allowing markup injection対応中かも @santhiprakash が今日担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
solidjs/solid#4689 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
solidjs/solid#4685 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
1.x
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Yeraze/meshmonitor#6239 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
better-auth/better-auth#12292 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
The sample email preview's ResizeObserver is never disconnected and keeps raising errors after leaving Settings対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
area:ui bug effort:S priority:P2
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
Typo in WSL project description on Projects page対応中かも @akhil9tiet が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
microsoft/opensource.microsoft.com#1066 · コメント 1 件 ·