Unable to move the thumb position from outside the slider when having a custom thumbImage
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- react-native, typescript
- 領域
- mobile
調査の方向性
まず、カスタム thumbImage を使用した制御された Slider の例を再現し、デフォルトの thumb の動作と比較します。thumbImage が設定されている場合に、外部からの値の変更がどのように適用されるかを追跡します。完了条件は、ボタンを押すと、カスタム画像を使用しない場合と同じようにカスタム thumb が位置 0 に移動することです。
索引モデルが issue の本文から書いたものです。
説明
Environment
- react-native info output:
// react-native info
Expo v53
-
are you using the new architecture?
yes -
which version of react & react-native are you using?
React 19 and React Native v0.79.2
Description
When having a custom thumbImage, the position of the thumb is not able to be updated from outside the Slider. For example, if you have a useEffect that change the value of the slider, the thumb position is being moved when thumbImage is by default. However, with a custom thumbImage, it's not the case.
Reproducible Demo
If you have something like this, clicking the button should move well the thumb position to position 0:
const [value, setValue] = useState<number>(20)
return (
<>
<Button
title={'Change value'}
onPress={(): void => setValue(0)}
/>
<View style={tw`justify-center`}>
<Slider
minimumValue={0}
maximumValue={100}
step={5}
value={value}
onValueChange={handleChange}
minimumTrackTintColor="#62A6E433"
maximumTrackTintColor="#62A6E433"
thumbTintColor={'#62A6E4'}
/>
</>
)
However, if you add a custom thumbImage, when clicking the button, the thumb position does not go to position 0:
const [value, setValue] = useState<number>(20)
return (
<>
<Button
title={'Change value'}
onPress={(): void => setValue(0)}
/>
<View style={tw`justify-center`}>
<Slider
minimumValue={0}
maximumValue={100}
step={5}
value={value}
onValueChange={handleChange}
minimumTrackTintColor="#62A6E433"
maximumTrackTintColor="#62A6E433"
StepMarker={(): ReactElement => <View style={tw`h-5`}></View>}
thumbTintColor={'#62A6E4'}
thumbImage={require('@src/assets/images/SliderThumb.png') as ImageURISource}
/>
</>
)
- 主要言語
- TypeScript
- スター
- 1.4k
- フォーク
- 295
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
callstack/react-native-slider のほかの issue
-
bug report
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
callstack/react-native-slider#769 ·
-
bug report platform: iOS
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
callstack/react-native-slider#782 · コメント 6 件 ·
-
bug report
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
callstack/react-native-slider#780 · コメント 1 件 ·
-
bug report
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
callstack/react-native-slider#767 ·
-
bug report platform: iOS
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
callstack/react-native-slider#758 · コメント 4 件 ·
callstack/react-native-slider の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
bcgov/bc-wallet-mobile#4761 · コメント 1 件 ·
-
external-issue to-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
area-deployment area-integrations triage:bot-seen
難易度 2/5 半日 初心者へのやさしさ 86/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
refactor
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100