react-native-select icon indicating copy to clipboard operation
react-native-select copied to clipboard

Having a data of 0 causing the placeholder to stay on

Open eroomeoj94 opened this issue 1 year ago • 3 comments

Describe the bug Having a data of 0 causing the placeholder to stay on. Using version 1.3.18

Expected behavior The placeholder should be hidden

Screenshots Screenshot 2024-09-09 at 16 06 55

Smartphone

  • Device: Android
  • OS: API 34

eroomeoj94 avatar Sep 09 '24 15:09 eroomeoj94

let me see if i can reproduce this issue since

kofiarkoh avatar Sep 09 '24 20:09 kofiarkoh

@eroomeoj94 could you provide more reproducible steps. a code snippet of your usage would be very much appreciated

kofiarkoh avatar Sep 10 '24 15:09 kofiarkoh

<DropdownSelect options={minutes} key={'minute-select'} placeholder={'Minutes'} isSearchable={false} dropdownContainerStyle={{width: 120}} dropdownStyle={{ borderRadius: 30, height: 40, borderColor: Color.blue, borderWidth: 3, paddingVertical: 5, paddingHorizontal: 15, minHeight: 40, width: 120, }} selectedItemStyle={{ fontFamily: StyleValues.regularFont, fontSize: 16, }} selectedValue={durationData.minute} dropdownIconStyle={{top: 15, right: 10}} isMultiple={false} onValueChange={setMinute} primaryColor={Color.textBlue}/>

const [minutes, setMinutes] = useState<any[]>([]); const [durationData, setDurationData] = useState<DurationData>(new DurationData()); setMinutes(generateMinutesArray()); function generateMinutesArray() { let minutes = []; for (let i = 0; i < 60; i += 5) { minutes.push({label: i.toString(), value: i}); } return minutes; }

@kofiarkoh Please see above the snippets of code I've used

eroomeoj94 avatar Sep 11 '24 08:09 eroomeoj94