-
-
Notifications
You must be signed in to change notification settings - Fork 235
Open
Description
I have an application that uses React Native Reusables, and for most users, the experience is good, however a very small subset of users are unable to open any Select drop down within the app.
I can't actually replicate the problem on my end, as it seems very rare and device specific.
Is there any information regarding this phenomenon? Has anyone dealt with similar problems or any common solutions that should resolve something like this.
Like I said, for the most part, it typically does work, only on a select few users' devices does it not.
Here is an example of a select within my app.
import { useTranslation } from "react-i18next";
import React from "react";
import {
Select,
SelectContent,
SelectGroup,
SelectItem,
SelectLabel,
SelectTrigger,
SelectValue
} from "@/components/ui/select";
import { Option } from "@rn-primitives/select";
import AsyncStorage from "@react-native-async-storage/async-storage";
function LanguageSelect() {
const { t, i18n } = useTranslation();
const languages = [
{ label: "English", value: "en-US" },
{ label: "Español", value: "es-US" },
{ label: "Français", value: "fr-CA" },
{ label: "Kreyòl Ayisyen", value: "ht-HT" },
{ label: "Português", value: "pt-BR" }
];
const onValueChange = (o: Option) => {
if (!o) return;
i18n.changeLanguage(o.value);
AsyncStorage.setItem("language", o.value);
};
const defaultValue = languages.find(l => l.value === i18n.language);
return (
<Select defaultValue={defaultValue} onValueChange={onValueChange} className="h-[2.75rem]">
<SelectTrigger className="w-[150px]">
<SelectValue
className="text-foreground text-sm native:text-lg"
placeholder={t("settings.selectALanguage")}
/>
</SelectTrigger>
<SelectContent className="w-[250px]">
<SelectGroup>
<SelectLabel>{t("settings.languages")}</SelectLabel>
{languages.map(language => (
<SelectItem
key={language.value}
label={language.label}
value={language.value}
/>
))}
</SelectGroup>
</SelectContent>
</Select>
);
}
Metadata
Metadata
Assignees
Labels
No labels