target device & action device v2
This commit is contained in:
1 parent
04f3e6194f
commit
a32e365d86
9 files changed
+173
-92
No files matched your search
@@ -19,14 +19,15 @@ export type InputAutoCompleteProps<T extends Option<any>> = {
|
||||
options: T[];
|
||||
getLabel?: (opt: T) => string;
|
||||
getID?: (opt: T) => string;
|
||||
helperText?: string;
|
||||
endAdornment?: ReactNode;
|
||||
required?: boolean;
|
||||
onlyShowLabel?: boolean;
|
||||
} & InputAutoCompletePropsBase;
|
||||
export type InputAutoCompletePropsBase = {
|
||||
label?: string;
|
||||
className?: string;
|
||||
disabled?: boolean;
|
||||
required?: boolean;
|
||||
onlyShowLabel?: boolean;
|
||||
helperText?: string;
|
||||
endAdornment?: ReactNode;
|
||||
} & (
|
||||
| {
|
||||
value: string | null;
|
||||
@@ -143,6 +144,7 @@ export function InputAutoComplete<T extends Option>(
|
||||
options={options}
|
||||
onChange={onChange}
|
||||
getOptionLabel={getLabel as any}
|
||||
disabled={props.disabled}
|
||||
PopperComponent={(props) => {
|
||||
return (
|
||||
<Popper
|
||||
@@ -200,6 +202,7 @@ export function InputAutoComplete<T extends Option>(
|
||||
required={props.required}
|
||||
label={props.label ?? "Entity ID"}
|
||||
helperText={helperText}
|
||||
disabled={props.disabled}
|
||||
error={error}
|
||||
/>
|
||||
)}
|
||||
|
||||
@@ -10,7 +10,6 @@ export type InputDeviceProps = InputAutoCompletePropsBase;
|
||||
export const InputDevice: FC<InputDeviceProps> = (props) => {
|
||||
// state
|
||||
const dr = useHADeviceRegistry();
|
||||
|
||||
return (
|
||||
<InputAutoComplete
|
||||
{...props}
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
max-height: 100%;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
min-width: 100%;
|
||||
max-width: 20em;
|
||||
|
||||
text-overflow: ellipsis;
|
||||
|
||||
Reference in new issue
Block a user