removing input area for now
This commit is contained in:
1 parent
ae352ff244
commit
c6c1efddae
6 files changed
+76
-36
No files matched your search
@@ -7,16 +7,18 @@ import { useHAAreas } from "haService/AreaRegistry";
|
||||
|
||||
export type InputAreaProps = InputAutoCompletePropsBase & {
|
||||
restrictToDomain?: string[];
|
||||
restrictedIntegrations?: string[];
|
||||
};
|
||||
|
||||
export const InputArea: FC<InputAreaProps> = (props) => {
|
||||
// state
|
||||
const areas = useHAAreas();
|
||||
console.log(areas);
|
||||
return (
|
||||
<InputAutoComplete
|
||||
{...props}
|
||||
validateOption={(v) => areas.validateOptions(v, props.restrictToDomain)}
|
||||
options={areas.getOptions(props.restrictToDomain)}
|
||||
validateOption={(v) => areas.validateOptions(v)}
|
||||
options={areas.getOptions()}
|
||||
getID={areas.getID}
|
||||
getLabel={areas.getLabel}
|
||||
onlyShowLabel
|
||||
|
||||
@@ -147,6 +147,7 @@ export function InputAutoComplete<T extends Option>(
|
||||
PopperComponent={(props) => {
|
||||
return (
|
||||
<Popper
|
||||
key={Math.random().toString()}
|
||||
{...props}
|
||||
className={[props.className, "input-autocomplete--popper"].join(
|
||||
" "
|
||||
|
||||
@@ -44,7 +44,6 @@ export default function InputYaml<T extends {}>({
|
||||
const setText = (t: string) => {
|
||||
try {
|
||||
yaml.load(t);
|
||||
console.log("success!", yaml.load(t));
|
||||
setState({ text: t, error: undefined, hasChanged: true });
|
||||
} catch (_) {
|
||||
setState({ text: t, error: "! Invalid Yaml !", hasChanged: true });
|
||||
|
||||
Reference in new issue
Block a user