Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Sliders with a Negative Min and Max Values are assigned '0' as Max value

Aperta
#418 6 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@BartoszKlonowski ci sta già lavorando.

Dal 16/8/2022.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

bug report platform: Windows

Environment

info Fetching system and libraries information...
System:
OS: Windows 10 10.0.19044
CPU: (16) x64 Intel(R) Core(TM) i7-10700 CPU @ 2.90GHz
Memory: 19.72 GB / 31.78 GB
Binaries:
Node: 14.17.4 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.5 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.14.14 - C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK:
AllowDevelopmentWithoutDevLicense: Enabled
AllowAllTrustedApps: Enabled
Versions: 10.0.18362.0, 10.0.19041.0
IDEs:
Android Studio: Not Found
Visual Studio: 16.11.31605.320 (Visual Studio Professional 2019)
Languages:
Java: Not Found
npmPackages:
@react-native-community/cli: Not Found
react: 18.0.0 => 18.0.0
react-native: 0.69.0 => 0.69.0
react-native-windows: 0.69.5 => 0.69.5
npmGlobalPackages:
react-native: Not Found

Description

I'm working on a React Native Windows project running the latest version of "@react-native-community/slider": "^4.3.0". We don't support iOS or Android so I can't replicate for those platforms.

We have some sliders that work with wholey negative ranges, an example being (-102, -86).

When initally rendered, the slider has a range of (-102, 0), instead of the given range (-102, -86).

In development mode I can change the max value and the range will render correctly, so this seems to be an issue with the inital render.

See below video:

https://user-images.githubusercontent.com/90039954/184871247-697ec5ef-1997-4042-a365-42844eaffbec.mp4

Reproducible Demo

import Slider from '@react-native-community/slider';
import React, { useState } from 'react';
import {
  SafeAreaView,
  Text,
} from 'react-native';

const App = () => {
  const [valueText, setValueText] = useState(-86)

  return (
    <SafeAreaView style={{flexDirection:'row', justifyContent: 'center'}}>
      <Slider
        minimumValue={-102}
        maximumValue={-86}
        value={-86}
        style={{width: 300, height:100}}
        onValueChange={setValueText}
      />
      <Text>{valueText}</Text>

    </SafeAreaView>
  );
};

export default App;
Lingua principale
TypeScript
Stelle
1.4k
Fork
295
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di callstack/react-native-slider

Tutte le issue di callstack/react-native-slider

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.