fix form field factory usage for autocomplete
fix names Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -8,13 +8,14 @@ import * as ElixForms from './components/ElixFormsComponent';
|
|||||||
function App() {
|
function App() {
|
||||||
const [count, setCount] = useState(0)
|
const [count, setCount] = useState(0)
|
||||||
|
|
||||||
/** @type {import('./components/ElixFormsComponent').ElixFormsReact} */
|
/** @type {import('./components/ElixFormsComponent').ElixFormsComponent} */
|
||||||
var myElixFormsReact = new ElixForms.ElixFormsReact();
|
var myElixFormsReact = new ElixForms.ElixFormsReact();
|
||||||
|
|
||||||
myElixFormsReact.props = {
|
myElixFormsReact.props = {
|
||||||
description: "This is a custom form created with ElixFormsReact component.",
|
description: "This is a custom form created with ElixFormsReact component.",
|
||||||
isDarkTheme: false,
|
isDarkTheme: false,
|
||||||
environmentMessage: "TESTING!",
|
environmentMessage: "TESTING!",
|
||||||
|
/*
|
||||||
additionalFieldsJson: JSON.stringify([
|
additionalFieldsJson: JSON.stringify([
|
||||||
{
|
{
|
||||||
"key": "COL0002",
|
"key": "COL0002",
|
||||||
@@ -82,8 +83,9 @@ function App() {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
]),
|
]),
|
||||||
|
*/
|
||||||
customFormFieldsConfiguration: (
|
customFormFieldsConfiguration: (
|
||||||
/** @type {import('./components/IElixFormsComponentProperties').ICustomFormFieldFactory} */
|
/** @type {import('./components/IElixFormsComponentCustomFormFieldFactory').IElixFormsComponentCustomFormFieldFactory} */
|
||||||
formFieldFactory
|
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();
|
return myElixFormsReact.render();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
import { JSX } from "react";
|
import { JSX } from "react";
|
||||||
import { IElixFormsComponentCustomFormFieldFactory } from "./IElixFormsComponentCustomFormFieldFactory";
|
import { IElixFormsComponentCustomFormFieldFactory } from "./IElixFormsComponentCustomFormFieldFactory";
|
||||||
|
|
||||||
export type ICustomFormFieldsConfiguration = (formFieldFactory: IElixFormsComponentCustomFormFieldFactory) => JSX.Element;
|
|
||||||
|
|
||||||
export interface IElixFormsComponentProperties {
|
export interface IElixFormsComponentProperties {
|
||||||
description: string;
|
description: string;
|
||||||
isDarkTheme: boolean;
|
isDarkTheme: boolean;
|
||||||
@@ -10,7 +8,7 @@ export interface IElixFormsComponentProperties {
|
|||||||
hasTeamsContext: boolean;
|
hasTeamsContext: boolean;
|
||||||
userDisplayName: string;
|
userDisplayName: string;
|
||||||
additionalFieldsJson?: string;
|
additionalFieldsJson?: string;
|
||||||
customFormFieldsConfiguration?: ICustomFormFieldsConfiguration;
|
customFormFieldsConfiguration?: (formFieldFactory: IElixFormsComponentCustomFormFieldFactory) => JSX.Element;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Additional Fields JSON Schema
|
// Additional Fields JSON Schema
|
||||||
|
|||||||
Reference in New Issue
Block a user