mirror of
https://github.com/inventree/InvenTree.git
synced 2026-09-02 10:18:42 +00:00
[UI] More sub-forms (#11785)
* Fix ApiFormFIeldType docstring * Case fix * Add sub-forms for company creation * Tweak component def * Add new company for manufacturer-part and supplier-part * Create new parameter template directly from parameter view * Add tooltip * Add playwright tests * Consolidate translation * Revert to left side * Fix title case --------- Co-authored-by: Matthias Mair <code@mjmair.com>
This commit is contained in:
@@ -37,7 +37,6 @@ export type ApiFormFieldHeader = {
|
||||
* - All other attributes are optional, and may be provided by the API
|
||||
* - However, they can be overridden by the user
|
||||
*
|
||||
* @param name : The name of the field
|
||||
* @param label : The label to display for the field
|
||||
* @param value : The value of the field
|
||||
* @param default : The default value of the field
|
||||
@@ -46,16 +45,21 @@ export type ApiFormFieldHeader = {
|
||||
* @param api_url : The API endpoint to fetch data from (for related fields)
|
||||
* @param pk_field : The primary key field for the related field (default = "pk")
|
||||
* @param model : The model to use for related fields
|
||||
* @param modelRenderer : Optional function to render the related model instance (for related fields)
|
||||
* @param filters : Optional API filters to apply to related fields
|
||||
* @param child: Optional definition of a child field (for nested objects)
|
||||
* @param children: Optional definitions of child fields (for nested objects with multiple fields)
|
||||
* @param required : Whether the field is required
|
||||
* @param allow_null: Whether the field allows null values
|
||||
* @param allow_blank: Whether the field allows blank values
|
||||
* @param error : Optional error message to display
|
||||
* @param hidden : Whether the field is hidden
|
||||
* @param disabled : Whether the field is disabled
|
||||
* @param error : Optional error message to display
|
||||
* @param allow_null: Whether the field allows null values
|
||||
* @param allow_blank: Whether the field allows blank values
|
||||
* @param exclude : Whether to exclude the field from the submitted data
|
||||
* @param read_only : Whether the field is read-only
|
||||
* @param placeholder : The placeholder text to display
|
||||
* @param placeholderAutofill: Whether to allow auto-filling of the placeholder value
|
||||
* @param addCreateFields : Fields to display when creating a new related object (for related fields)
|
||||
* @param description : The description to display for the field
|
||||
* @param preFieldContent : Content to render before the field
|
||||
* @param postFieldContent : Content to render after the field
|
||||
@@ -63,11 +67,11 @@ export type ApiFormFieldHeader = {
|
||||
* @param rightSection : Content to render in the right section of the field
|
||||
* @param autoFill: Whether to automatically fill the field with data from the API
|
||||
* @param autoFillFilters: Optional filters to apply when auto-filling the field
|
||||
* @param adjustValue : Callback function to adjust the value of the field before it is sent to the API
|
||||
* @param onValueChange : Callback function to call when the field value changes
|
||||
* @param adjustFilters : Callback function to adjust the filters for a related field before a query is made
|
||||
* @param adjustValue : Callback function to adjust the value of the field before it is sent to the API
|
||||
* @param addRow : Callback function to add a new row to a table field
|
||||
* @param onKeyDown : Callback function to get which key was pressed in the form to handle submission on enter
|
||||
* @param headers : Optional definitions of table headers (for table fields)
|
||||
* @param singleFetchFunction : Optional function to fetch a single value for this field (used for fetching the initial value when editing an existing object)
|
||||
*/
|
||||
export type ApiFormFieldType = {
|
||||
|
||||
Reference in New Issue
Block a user