fix form field factory usage for autocomplete

fix names

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-04-27 13:15:08 +02:00
co-authored by Copilot
parent 04b0e795eb
commit 5db8c6135e
2 changed files with 5 additions and 19 deletions
+4 -16
View File
@@ -8,13 +8,14 @@ import * as ElixForms from './components/ElixFormsComponent';
function App() {
const [count, setCount] = useState(0)
/** @type {import('./components/ElixFormsComponent').ElixFormsReact} */
/** @type {import('./components/ElixFormsComponent').ElixFormsComponent} */
var myElixFormsReact = new ElixForms.ElixFormsReact();
myElixFormsReact.props = {
description: "This is a custom form created with ElixFormsReact component.",
isDarkTheme: false,
environmentMessage: "TESTING!",
/*
additionalFieldsJson: JSON.stringify([
{
"key": "COL0002",
@@ -82,8 +83,9 @@ function App() {
]
}
]),
*/
customFormFieldsConfiguration: (
/** @type {import('./components/IElixFormsComponentProperties').ICustomFormFieldFactory} */
/** @type {import('./components/IElixFormsComponentCustomFormFieldFactory').IElixFormsComponentCustomFormFieldFactory} */
formFieldFactory
) => (
<>
@@ -93,20 +95,6 @@ function App() {
)
};
// myElixFormsReact.addTextInput("name", "Name", true);
// myElixFormsReact.addTextAreaInput("description", "Description");
// myElixFormsReact.addNumberInput("age", "Age");
// myElixFormsReact.addDropdownInput("country", "Country", new Map<number, string>([
// [1, "Italy"],
// [2, "USA"],
// [3, "UK"]
// ]));
// myElixFormsReact.addCheckboxInput("hobbies", "Hobbies", new Map<number, string>([
// [1, "Sports"],
// [2, "Music"],
// [3, "Traveling"]
// ]));
return myElixFormsReact.render();
}
@@ -1,8 +1,6 @@
import { JSX } from "react";
import { IElixFormsComponentCustomFormFieldFactory } from "./IElixFormsComponentCustomFormFieldFactory";
export type ICustomFormFieldsConfiguration = (formFieldFactory: IElixFormsComponentCustomFormFieldFactory) => JSX.Element;
export interface IElixFormsComponentProperties {
description: string;
isDarkTheme: boolean;
@@ -10,7 +8,7 @@ export interface IElixFormsComponentProperties {
hasTeamsContext: boolean;
userDisplayName: string;
additionalFieldsJson?: string;
customFormFieldsConfiguration?: ICustomFormFieldsConfiguration;
customFormFieldsConfiguration?: (formFieldFactory: IElixFormsComponentCustomFormFieldFactory) => JSX.Element;
}
// Additional Fields JSON Schema