Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Unable to move the thumb position from outside the slider when having a custom thumbImage

オープン
#712 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
react-native, typescript
領域
mobile

調査の方向性

まず、カスタム thumbImage を使用した制御された Slider の例を再現し、デフォルトの thumb の動作と比較します。thumbImage が設定されている場合に、外部からの値の変更がどのように適用されるかを追跡します。完了条件は、ボタンを押すと、カスタム画像を使用しない場合と同じようにカスタム thumb が位置 0 に移動することです。

索引モデルが issue の本文から書いたものです。

説明

bug report

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 はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

callstack/react-native-slider のほかの issue

callstack/react-native-slider の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。