handling missing ids better + more tranlsations

This commit is contained in:
ari committed 2022-09-01 17:21:00 -04:00
1 parent 69a9805c02
commit 774ebe482a
45 files changed
+556 -262

No files matched your search

@@ -1,5 +1,6 @@
import { FC } from "react";
import { useHADeviceRegistry } from "haService";
import { useLang } from "lang";
import {
InputAutoComplete,
InputAutoCompletePropsBase,
@@ -9,11 +10,12 @@ export type InputDeviceProps = InputAutoCompletePropsBase;
export const InputDevice: FC<InputDeviceProps> = (props) => {
// state
const lang = useLang();
const dr = useHADeviceRegistry();
return (
<InputAutoComplete
{...props}
label={props.label ?? "Device"}
label={props.label ?? lang.get("DEVICE")}
getID={dr.getID}
getLabel={dr.getLabel}
options={dr.getOptions()}