-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path051144d9.6f68e031.js
1 lines (1 loc) · 40.3 KB
/
051144d9.6f68e031.js
1
"use strict";(self.webpackChunkadminforth=self.webpackChunkadminforth||[]).push([[2025],{6547:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>m,frontMatter:()=>s,metadata:()=>i,toc:()=>t});const i=JSON.parse('{"id":"api/Common/interfaces/AdminForthResourceColumnCommon","title":"AdminForthResourceColumnCommon","description":"Column describes one field in the table or collection in database.","source":"@site/docs/api/Common/interfaces/AdminForthResourceColumnCommon.md","sourceDirName":"api/Common/interfaces","slug":"/api/Common/interfaces/AdminForthResourceColumnCommon","permalink":"/docs/api/Common/interfaces/AdminForthResourceColumnCommon","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"apiSidebar","previous":{"title":"AdminForthPolymorphicForeignResource","permalink":"/docs/api/Common/interfaces/AdminForthPolymorphicForeignResource"},"next":{"title":"AdminForthResourceColumnInputCommon","permalink":"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon"}}');var r=o(4848),d=o(8453);const s={},l="AdminForthResourceColumnCommon",c={},t=[{value:"Extends",id:"extends",level:2},{value:"Properties",id:"properties",level:2},{value:"_underlineType?",id:"_underlinetype",level:3},{value:"allowMinMaxQuery?",id:"allowminmaxquery",level:3},{value:"Inherited from",id:"inherited-from",level:4},{value:"backendOnly?",id:"backendonly",level:3},{value:"Inherited from",id:"inherited-from-1",level:4},{value:"components?",id:"components",level:3},{value:"Inherited from",id:"inherited-from-2",level:4},{value:"editReadonly?",id:"editreadonly",level:3},{value:"Inherited from",id:"inherited-from-3",level:4},{value:"editingNote?",id:"editingnote",level:3},{value:"create?",id:"create",level:4},{value:"edit?",id:"edit",level:4},{value:"Overrides",id:"overrides",level:4},{value:"enforceLowerCase?",id:"enforcelowercase",level:3},{value:"Inherited from",id:"inherited-from-4",level:4},{value:"enum?",id:"enum",level:3},{value:"Inherited from",id:"inherited-from-5",level:4},{value:"extra?",id:"extra",level:3},{value:"jsonCollapsedLevel?",id:"jsoncollapsedlevel",level:4},{value:"Inherited from",id:"inherited-from-6",level:4},{value:"fillOnCreate?",id:"filloncreate",level:3},{value:"Inherited from",id:"inherited-from-7",level:4},{value:"filterOptions?",id:"filteroptions",level:3},{value:"debounceTimeMs?",id:"debouncetimems",level:4},{value:"multiselect?",id:"multiselect",level:4},{value:"substringSearch?",id:"substringsearch",level:4},{value:"Inherited from",id:"inherited-from-8",level:4},{value:"foreignResource?",id:"foreignresource",level:3},{value:"Inherited from",id:"inherited-from-9",level:4},{value:"inputPrefix?",id:"inputprefix",level:3},{value:"Inherited from",id:"inherited-from-10",level:4},{value:"inputSuffix?",id:"inputsuffix",level:3},{value:"Inherited from",id:"inherited-from-11",level:4},{value:"isArray?",id:"isarray",level:3},{value:"allowDuplicateItems?",id:"allowduplicateitems",level:4},{value:"enabled",id:"enabled",level:4},{value:"itemType",id:"itemtype",level:4},{value:"Inherited from",id:"inherited-from-12",level:4},{value:"isUnique?",id:"isunique",level:3},{value:"Inherited from",id:"inherited-from-13",level:4},{value:"label?",id:"label",level:3},{value:"Inherited from",id:"inherited-from-14",level:4},{value:"masked?",id:"masked",level:3},{value:"Inherited from",id:"inherited-from-15",level:4},{value:"max?",id:"max",level:3},{value:"Inherited from",id:"inherited-from-16",level:4},{value:"maxLength?",id:"maxlength",level:3},{value:"Inherited from",id:"inherited-from-17",level:4},{value:"maxValue?",id:"maxvalue",level:3},{value:"Inherited from",id:"inherited-from-18",level:4},{value:"min?",id:"min",level:3},{value:"Inherited from",id:"inherited-from-19",level:4},{value:"minLength?",id:"minlength",level:3},{value:"Inherited from",id:"inherited-from-20",level:4},{value:"minValue?",id:"minvalue",level:3},{value:"Inherited from",id:"inherited-from-21",level:4},{value:"name",id:"name",level:3},{value:"Inherited from",id:"inherited-from-22",level:4},{value:"primaryKey?",id:"primarykey",level:3},{value:"Inherited from",id:"inherited-from-23",level:4},{value:"required?",id:"required",level:3},{value:"create?",id:"create-1",level:4},{value:"edit?",id:"edit-1",level:4},{value:"Overrides",id:"overrides-1",level:4},{value:"showIn?",id:"showin",level:3},{value:"Inherited from",id:"inherited-from-24",level:4},{value:"sortable?",id:"sortable",level:3},{value:"Inherited from",id:"inherited-from-25",level:4},{value:"suggestOnCreate?",id:"suggestoncreate",level:3},{value:"Inherited from",id:"inherited-from-26",level:4},{value:"type?",id:"type",level:3},{value:"Inherited from",id:"inherited-from-27",level:4},{value:"validation?",id:"validation",level:3},{value:"Inherited from",id:"inherited-from-28",level:4},{value:"virtual?",id:"virtual",level:3},{value:"Inherited from",id:"inherited-from-29",level:4}];function h(e){const n={a:"a",blockquote:"blockquote",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",header:"header",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,d.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"adminforthresourcecolumncommon",children:"AdminForthResourceColumnCommon"})}),"\n",(0,r.jsx)(n.p,{children:"Column describes one field in the table or collection in database."}),"\n",(0,r.jsx)(n.h2,{id:"extends",children:"Extends"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon",children:(0,r.jsx)(n.code,{children:"AdminForthResourceColumnInputCommon"})})}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"properties",children:"Properties"}),"\n",(0,r.jsx)(n.h3,{id:"_underlinetype",children:"_underlineType?"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"optional"})," ",(0,r.jsx)(n.strong,{children:"_underlineType"}),": ",(0,r.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Internal type which indicates original type of column in database."}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h3,{id:"allowminmaxquery",children:"allowMinMaxQuery?"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"optional"})," ",(0,r.jsx)(n.strong,{children:"allowMinMaxQuery"}),": ",(0,r.jsx)(n.code,{children:"boolean"})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Allow AdminForth to execute SELECT min(column) and SELECT max(column) queries to get min and max values for this column.\nThis would improve UX of filters by adding sliders for numeric columns."}),"\n",(0,r.jsxs)(n.p,{children:["NOTE: By default is option is ",(0,r.jsx)(n.code,{children:"false"})," to prevent performance issues on large tables.\nIf you are going to set it to ",(0,r.jsx)(n.code,{children:"true"}),", make sure you have a one-item index on this column (one index for each column which has it) or ensure your table will not have a large number of records."]}),"\n",(0,r.jsx)(n.h4,{id:"inherited-from",children:"Inherited from"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon",children:(0,r.jsx)(n.code,{children:"AdminForthResourceColumnInputCommon"})})," . ",(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon#allowminmaxquery",children:(0,r.jsx)(n.code,{children:"allowMinMaxQuery"})})]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h3,{id:"backendonly",children:"backendOnly?"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"optional"})," ",(0,r.jsx)(n.strong,{children:"backendOnly"}),": ",(0,r.jsx)(n.code,{children:"boolean"})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"if true field will !not be passed to UI under no circumstances, but will be presented in hooks"}),"\n",(0,r.jsx)(n.h4,{id:"inherited-from-1",children:"Inherited from"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon",children:(0,r.jsx)(n.code,{children:"AdminForthResourceColumnInputCommon"})})," . ",(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon#backendonly",children:(0,r.jsx)(n.code,{children:"backendOnly"})})]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h3,{id:"components",children:"components?"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"optional"})," ",(0,r.jsx)(n.strong,{children:"components"}),": ",(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthFieldComponents",children:(0,r.jsx)(n.code,{children:"AdminForthFieldComponents"})})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Custom components which will be used to render this field in the admin panel."}),"\n",(0,r.jsx)(n.h4,{id:"inherited-from-2",children:"Inherited from"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon",children:(0,r.jsx)(n.code,{children:"AdminForthResourceColumnInputCommon"})})," . ",(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon#components",children:(0,r.jsx)(n.code,{children:"components"})})]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h3,{id:"editreadonly",children:"editReadonly?"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"optional"})," ",(0,r.jsx)(n.strong,{children:"editReadonly"}),": ",(0,r.jsx)(n.code,{children:"boolean"})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Whether AdminForth will allow to edit this field in editing mode."}),"\n",(0,r.jsx)(n.h4,{id:"inherited-from-3",children:"Inherited from"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon",children:(0,r.jsx)(n.code,{children:"AdminForthResourceColumnInputCommon"})})," . ",(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon#editreadonly",children:(0,r.jsx)(n.code,{children:"editReadonly"})})]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h3,{id:"editingnote",children:"editingNote?"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"optional"})," ",(0,r.jsx)(n.strong,{children:"editingNote"}),": ",(0,r.jsx)(n.code,{children:"object"})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Whether AdminForth will show editing note near the field in edit/create form."}),"\n",(0,r.jsx)(n.h4,{id:"create",children:"create?"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"optional"})," ",(0,r.jsx)(n.strong,{children:"create"}),": ",(0,r.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,r.jsx)(n.h4,{id:"edit",children:"edit?"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"optional"})," ",(0,r.jsx)(n.strong,{children:"edit"}),": ",(0,r.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,r.jsx)(n.h4,{id:"overrides",children:"Overrides"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon",children:(0,r.jsx)(n.code,{children:"AdminForthResourceColumnInputCommon"})})," . ",(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon#editingnote",children:(0,r.jsx)(n.code,{children:"editingNote"})})]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h3,{id:"enforcelowercase",children:"enforceLowerCase?"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"optional"})," ",(0,r.jsx)(n.strong,{children:"enforceLowerCase"}),": ",(0,r.jsx)(n.code,{children:"boolean"})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Will automatically convert any capital letters to lowercase in input during editing"}),"\n",(0,r.jsx)(n.h4,{id:"inherited-from-4",children:"Inherited from"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon",children:(0,r.jsx)(n.code,{children:"AdminForthResourceColumnInputCommon"})})," . ",(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon#enforcelowercase",children:(0,r.jsx)(n.code,{children:"enforceLowerCase"})})]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h3,{id:"enum",children:"enum?"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"optional"})," ",(0,r.jsx)(n.strong,{children:"enum"}),": ",(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthColumnEnumItem",children:(0,r.jsx)(n.code,{children:"AdminForthColumnEnumItem"})}),"[]"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Enum of possible values for this field."}),"\n",(0,r.jsx)(n.h4,{id:"inherited-from-5",children:"Inherited from"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon",children:(0,r.jsx)(n.code,{children:"AdminForthResourceColumnInputCommon"})})," . ",(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon#enum",children:(0,r.jsx)(n.code,{children:"enum"})})]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h3,{id:"extra",children:"extra?"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"optional"})," ",(0,r.jsx)(n.strong,{children:"extra"}),": ",(0,r.jsx)(n.code,{children:"object"})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"An optional configuration object for extra settings."}),"\n",(0,r.jsx)(n.h4,{id:"jsoncollapsedlevel",children:"jsonCollapsedLevel?"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"optional"})," ",(0,r.jsx)(n.strong,{children:"jsonCollapsedLevel"}),": ",(0,r.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["How many levels of JSON should be collapsed.\n",(0,r.jsx)(n.code,{children:"0"})," means - root level will be already collapsed e.g. ",(0,r.jsx)(n.code,{children:"{a:1}"})," will show ",(0,r.jsx)(n.code,{children:"{...}"})," where ",(0,r.jsx)(n.code,{children:"'...'"})," is clickable\n",(0,r.jsx)(n.code,{children:"1"})," means - root level will be shown, but next sub-level will be collapsed e.g. ",(0,r.jsx)(n.code,{children:"{a: {b: 1}}"})," will show ",(0,r.jsx)(n.code,{children:"{a: ...}"})," where ",(0,r.jsx)(n.code,{children:"'...'"})," is clickable"]}),"\n",(0,r.jsx)(n.p,{children:"Default is 1."}),"\n",(0,r.jsx)(n.h4,{id:"inherited-from-6",children:"Inherited from"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon",children:(0,r.jsx)(n.code,{children:"AdminForthResourceColumnInputCommon"})})," . ",(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon#extra",children:(0,r.jsx)(n.code,{children:"extra"})})]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h3,{id:"filloncreate",children:"fillOnCreate?"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"optional"})," ",(0,r.jsx)(n.strong,{children:"fillOnCreate"}),": ",(0,r.jsx)(n.a,{href:"/docs/api/Common/type-aliases/FillOnCreateFunction",children:(0,r.jsx)(n.code,{children:"FillOnCreateFunction"})})]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["Called on the backend when the record is saved to a database. Value returned by ",(0,r.jsx)(n.code,{children:"fillOnCreate"})," will be saved to the database."]}),"\n",(0,r.jsx)(n.h4,{id:"inherited-from-7",children:"Inherited from"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon",children:(0,r.jsx)(n.code,{children:"AdminForthResourceColumnInputCommon"})})," . ",(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon#filloncreate",children:(0,r.jsx)(n.code,{children:"fillOnCreate"})})]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h3,{id:"filteroptions",children:"filterOptions?"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"optional"})," ",(0,r.jsx)(n.strong,{children:"filterOptions"}),": ",(0,r.jsx)(n.code,{children:"object"})]}),"\n"]}),"\n",(0,r.jsx)(n.h4,{id:"debouncetimems",children:"debounceTimeMs?"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"optional"})," ",(0,r.jsx)(n.strong,{children:"debounceTimeMs"}),": ",(0,r.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Decrease number of requests by adding debounce time to filter requests."}),"\n",(0,r.jsx)(n.h4,{id:"multiselect",children:"multiselect?"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"optional"})," ",(0,r.jsx)(n.strong,{children:"multiselect"}),": ",(0,r.jsx)(n.code,{children:"boolean"})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Boolean value that determines what select input type to display on filter page."}),"\n",(0,r.jsx)(n.h4,{id:"substringsearch",children:"substringSearch?"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"optional"})," ",(0,r.jsx)(n.strong,{children:"substringSearch"}),": ",(0,r.jsx)(n.code,{children:"boolean"})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"If false - will force EQ operator for filter instead of ILIKE."}),"\n",(0,r.jsx)(n.h4,{id:"inherited-from-8",children:"Inherited from"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon",children:(0,r.jsx)(n.code,{children:"AdminForthResourceColumnInputCommon"})})," . ",(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon#filteroptions",children:(0,r.jsx)(n.code,{children:"filterOptions"})})]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h3,{id:"foreignresource",children:"foreignResource?"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"optional"})," ",(0,r.jsx)(n.strong,{children:"foreignResource"}),": ",(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthForeignResourceCommon",children:(0,r.jsx)(n.code,{children:"AdminForthForeignResourceCommon"})})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Foreign resource which has pk column with values same that written in this column."}),"\n",(0,r.jsx)(n.h4,{id:"inherited-from-9",children:"Inherited from"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon",children:(0,r.jsx)(n.code,{children:"AdminForthResourceColumnInputCommon"})})," . ",(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon#foreignresource",children:(0,r.jsx)(n.code,{children:"foreignResource"})})]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h3,{id:"inputprefix",children:"inputPrefix?"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"optional"})," ",(0,r.jsx)(n.strong,{children:"inputPrefix"}),": ",(0,r.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Prefix and suffix for input field on create and edit pages."}),"\n",(0,r.jsx)(n.h4,{id:"inherited-from-10",children:"Inherited from"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon",children:(0,r.jsx)(n.code,{children:"AdminForthResourceColumnInputCommon"})})," . ",(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon#inputprefix",children:(0,r.jsx)(n.code,{children:"inputPrefix"})})]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h3,{id:"inputsuffix",children:"inputSuffix?"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"optional"})," ",(0,r.jsx)(n.strong,{children:"inputSuffix"}),": ",(0,r.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,r.jsx)(n.h4,{id:"inherited-from-11",children:"Inherited from"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon",children:(0,r.jsx)(n.code,{children:"AdminForthResourceColumnInputCommon"})})," . ",(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon#inputsuffix",children:(0,r.jsx)(n.code,{children:"inputSuffix"})})]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h3,{id:"isarray",children:"isArray?"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"optional"})," ",(0,r.jsx)(n.strong,{children:"isArray"}),": ",(0,r.jsx)(n.code,{children:"object"})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Defines whether column is array and what type of items it contains.\nAdminForth will use this information to render proper input fields in the admin panel with control buttons to add and remove items.\nIf enabled, requires column type to be JSON.\nCannot be used with masked columns, columns with foreignResource or primary key columns."}),"\n",(0,r.jsx)(n.h4,{id:"allowduplicateitems",children:"allowDuplicateItems?"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"optional"})," ",(0,r.jsx)(n.strong,{children:"allowDuplicateItems"}),": ",(0,r.jsx)(n.code,{children:"boolean"})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"If enabled, AdminForth will allow to add items with the same value."}),"\n",(0,r.jsx)(n.h4,{id:"enabled",children:"enabled"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"enabled"}),": ",(0,r.jsx)(n.code,{children:"boolean"})]}),"\n"]}),"\n",(0,r.jsx)(n.h4,{id:"itemtype",children:"itemType"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"itemType"}),": ",(0,r.jsx)(n.a,{href:"/docs/api/Common/enumerations/AdminForthDataTypes",children:(0,r.jsx)(n.code,{children:"AdminForthDataTypes"})})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Type of items in array. Cannot be JSON or RICHTEXT."}),"\n",(0,r.jsx)(n.h4,{id:"inherited-from-12",children:"Inherited from"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon",children:(0,r.jsx)(n.code,{children:"AdminForthResourceColumnInputCommon"})})," . ",(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon#isarray",children:(0,r.jsx)(n.code,{children:"isArray"})})]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h3,{id:"isunique",children:"isUnique?"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"optional"})," ",(0,r.jsx)(n.strong,{children:"isUnique"}),": ",(0,r.jsx)(n.code,{children:"boolean"})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Whether AdminForth will request user to enter unique value during creating or editing record.\nThis option causes AdminForth to make a request to database to check if value is unique.\n(Constraints are not used, so for large-tables performance make sure you have unique index in database if you set this option to true)"}),"\n",(0,r.jsx)(n.h4,{id:"inherited-from-13",children:"Inherited from"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon",children:(0,r.jsx)(n.code,{children:"AdminForthResourceColumnInputCommon"})})," . ",(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon#isunique",children:(0,r.jsx)(n.code,{children:"isUnique"})})]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h3,{id:"label",children:"label?"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"optional"})," ",(0,r.jsx)(n.strong,{children:"label"}),": ",(0,r.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"How column can be labled in the admin panel.\nUse it for renaming columns. Defaulted to column name with Uppercased first letter."}),"\n",(0,r.jsx)(n.h4,{id:"inherited-from-14",children:"Inherited from"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon",children:(0,r.jsx)(n.code,{children:"AdminForthResourceColumnInputCommon"})})," . ",(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon#label",children:(0,r.jsx)(n.code,{children:"label"})})]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h3,{id:"masked",children:"masked?"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"optional"})," ",(0,r.jsx)(n.strong,{children:"masked"}),": ",(0,r.jsx)(n.code,{children:"boolean"})]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["Masked fields will be displayed as ",(0,r.jsx)(n.code,{children:"*****"})," on Edit and Create pages."]}),"\n",(0,r.jsx)(n.h4,{id:"inherited-from-15",children:"Inherited from"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon",children:(0,r.jsx)(n.code,{children:"AdminForthResourceColumnInputCommon"})})," . ",(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon#masked",children:(0,r.jsx)(n.code,{children:"masked"})})]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h3,{id:"max",children:"max?"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"optional"})," ",(0,r.jsx)(n.strong,{children:"max"}),": ",(0,r.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,r.jsx)(n.h4,{id:"inherited-from-16",children:"Inherited from"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon",children:(0,r.jsx)(n.code,{children:"AdminForthResourceColumnInputCommon"})})," . ",(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon#max",children:(0,r.jsx)(n.code,{children:"max"})})]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h3,{id:"maxlength",children:"maxLength?"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"optional"})," ",(0,r.jsx)(n.strong,{children:"maxLength"}),": ",(0,r.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Maximum length of string that can be entered in this field."}),"\n",(0,r.jsx)(n.h4,{id:"inherited-from-17",children:"Inherited from"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon",children:(0,r.jsx)(n.code,{children:"AdminForthResourceColumnInputCommon"})})," . ",(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon#maxlength",children:(0,r.jsx)(n.code,{children:"maxLength"})})]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h3,{id:"maxvalue",children:"maxValue?"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"optional"})," ",(0,r.jsx)(n.strong,{children:"maxValue"}),": ",(0,r.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Maximum value that can be entered in this field."}),"\n",(0,r.jsx)(n.h4,{id:"inherited-from-18",children:"Inherited from"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon",children:(0,r.jsx)(n.code,{children:"AdminForthResourceColumnInputCommon"})})," . ",(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon#maxvalue",children:(0,r.jsx)(n.code,{children:"maxValue"})})]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h3,{id:"min",children:"min?"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"optional"})," ",(0,r.jsx)(n.strong,{children:"min"}),": ",(0,r.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,r.jsx)(n.h4,{id:"inherited-from-19",children:"Inherited from"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon",children:(0,r.jsx)(n.code,{children:"AdminForthResourceColumnInputCommon"})})," . ",(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon#min",children:(0,r.jsx)(n.code,{children:"min"})})]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h3,{id:"minlength",children:"minLength?"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"optional"})," ",(0,r.jsx)(n.strong,{children:"minLength"}),": ",(0,r.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Minimum length of string that can be entered in this field."}),"\n",(0,r.jsx)(n.h4,{id:"inherited-from-20",children:"Inherited from"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon",children:(0,r.jsx)(n.code,{children:"AdminForthResourceColumnInputCommon"})})," . ",(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon#minlength",children:(0,r.jsx)(n.code,{children:"minLength"})})]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h3,{id:"minvalue",children:"minValue?"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"optional"})," ",(0,r.jsx)(n.strong,{children:"minValue"}),": ",(0,r.jsx)(n.code,{children:"number"})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Minimum value that can be entered in this field."}),"\n",(0,r.jsx)(n.h4,{id:"inherited-from-21",children:"Inherited from"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon",children:(0,r.jsx)(n.code,{children:"AdminForthResourceColumnInputCommon"})})," . ",(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon#minvalue",children:(0,r.jsx)(n.code,{children:"minValue"})})]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h3,{id:"name",children:"name"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"name"}),": ",(0,r.jsx)(n.code,{children:"string"})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Column name in database."}),"\n",(0,r.jsx)(n.h4,{id:"inherited-from-22",children:"Inherited from"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon",children:(0,r.jsx)(n.code,{children:"AdminForthResourceColumnInputCommon"})})," . ",(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon#name",children:(0,r.jsx)(n.code,{children:"name"})})]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h3,{id:"primarykey",children:"primaryKey?"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"optional"})," ",(0,r.jsx)(n.strong,{children:"primaryKey"}),": ",(0,r.jsx)(n.code,{children:"boolean"})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Whether to use this column as record identifier.\nOnly one column can be primary key.\nAdminForth tries to guess primary key automatically first."}),"\n",(0,r.jsx)(n.h4,{id:"inherited-from-23",children:"Inherited from"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon",children:(0,r.jsx)(n.code,{children:"AdminForthResourceColumnInputCommon"})})," . ",(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon#primarykey",children:(0,r.jsx)(n.code,{children:"primaryKey"})})]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h3,{id:"required",children:"required?"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"optional"})," ",(0,r.jsx)(n.strong,{children:"required"}),": ",(0,r.jsx)(n.code,{children:"object"})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Whether AdminForth will require this field to be filled in create and edit forms.\nCan be set to boolean or object with create and edit properties.\nIf boolean, it will be used for both create and edit forms."}),"\n",(0,r.jsx)(n.h4,{id:"create-1",children:"create?"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"optional"})," ",(0,r.jsx)(n.strong,{children:"create"}),": ",(0,r.jsx)(n.code,{children:"boolean"})]}),"\n"]}),"\n",(0,r.jsx)(n.h4,{id:"edit-1",children:"edit?"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"optional"})," ",(0,r.jsx)(n.strong,{children:"edit"}),": ",(0,r.jsx)(n.code,{children:"boolean"})]}),"\n"]}),"\n",(0,r.jsx)(n.h4,{id:"overrides-1",children:"Overrides"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon",children:(0,r.jsx)(n.code,{children:"AdminForthResourceColumnInputCommon"})})," . ",(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon#required",children:(0,r.jsx)(n.code,{children:"required"})})]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h3,{id:"showin",children:"showIn?"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"optional"})," ",(0,r.jsx)(n.strong,{children:"showIn"}),": ",(0,r.jsx)(n.a,{href:"/docs/api/Common/type-aliases/ShowInResolved",children:(0,r.jsx)(n.code,{children:"ShowInResolved"})})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Defines on which AdminForth pages this field will be shown. By default all.\nExample: if you want to show field only in create and edit pages, set it to"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-ts",children:"showIn: { create: true, edit: true }\n"})}),"\n",(0,r.jsx)(n.p,{children:"If you wish show only in list view, set it to:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-ts",children:"showIn: { all: false, list: true }\n"})}),"\n",(0,r.jsx)(n.p,{children:"If you wish to hide only in list you can use:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-ts",children:"showIn: { all: true, list: false }\n"})}),"\n",(0,r.jsx)(n.p,{children:"or"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-ts",children:"showIn: { list: false } // all: true is by default already\n"})}),"\n",(0,r.jsx)(n.p,{children:"Also might have callback which will be called with same syntax as allowedActions."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-ts",children:"showIn: {\n list: ({ resource, adminUser }) => {\n return adminUser.dbUser.role === 'superadmin';\n },\n show: true,\n}\n"})}),"\n",(0,r.jsx)(n.h4,{id:"inherited-from-24",children:"Inherited from"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon",children:(0,r.jsx)(n.code,{children:"AdminForthResourceColumnInputCommon"})})," . ",(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon#showin",children:(0,r.jsx)(n.code,{children:"showIn"})})]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h3,{id:"sortable",children:"sortable?"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"optional"})," ",(0,r.jsx)(n.strong,{children:"sortable"}),": ",(0,r.jsx)(n.code,{children:"boolean"})]}),"\n"]}),"\n",(0,r.jsx)(n.h4,{id:"inherited-from-25",children:"Inherited from"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon",children:(0,r.jsx)(n.code,{children:"AdminForthResourceColumnInputCommon"})})," . ",(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon#sortable",children:(0,r.jsx)(n.code,{children:"sortable"})})]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h3,{id:"suggestoncreate",children:"suggestOnCreate?"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"optional"})," ",(0,r.jsx)(n.strong,{children:"suggestOnCreate"}),": ",(0,r.jsx)(n.code,{children:"string"})," | ",(0,r.jsx)(n.code,{children:"number"})," | ",(0,r.jsx)(n.code,{children:"boolean"})," | ",(0,r.jsx)(n.code,{children:"object"})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Single value that will be substituted in create form. User can change it before saving the record."}),"\n",(0,r.jsx)(n.h4,{id:"inherited-from-26",children:"Inherited from"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon",children:(0,r.jsx)(n.code,{children:"AdminForthResourceColumnInputCommon"})})," . ",(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon#suggestoncreate",children:(0,r.jsx)(n.code,{children:"suggestOnCreate"})})]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h3,{id:"type",children:"type?"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"optional"})," ",(0,r.jsx)(n.strong,{children:"type"}),": ",(0,r.jsx)(n.a,{href:"/docs/api/Common/enumerations/AdminForthDataTypes",children:(0,r.jsx)(n.code,{children:"AdminForthDataTypes"})})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Type of data in column.\nAdminForth will use this information to render proper input fields in the admin panel.\nAdminForth tries to guess type of data from database column type automatically for typed databases like SQL-based.\nHowever you can explicitly set it to any value. E.g. set AdminForthDataTypes.DATETIME for your string column in SQLite, which stores ISO date strings."}),"\n",(0,r.jsx)(n.h4,{id:"inherited-from-27",children:"Inherited from"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon",children:(0,r.jsx)(n.code,{children:"AdminForthResourceColumnInputCommon"})})," . ",(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon#type",children:(0,r.jsx)(n.code,{children:"type"})})]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h3,{id:"validation",children:"validation?"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"optional"})," ",(0,r.jsx)(n.strong,{children:"validation"}),": ",(0,r.jsx)(n.a,{href:"/docs/api/Common/type-aliases/ValidationObject",children:(0,r.jsx)(n.code,{children:"ValidationObject"})}),"[]"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Runtime validation Regexp rules for this field."}),"\n",(0,r.jsx)(n.h4,{id:"inherited-from-28",children:"Inherited from"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon",children:(0,r.jsx)(n.code,{children:"AdminForthResourceColumnInputCommon"})})," . ",(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon#validation",children:(0,r.jsx)(n.code,{children:"validation"})})]}),"\n",(0,r.jsx)(n.hr,{}),"\n",(0,r.jsx)(n.h3,{id:"virtual",children:"virtual?"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"optional"})," ",(0,r.jsx)(n.strong,{children:"virtual"}),": ",(0,r.jsx)(n.code,{children:"boolean"})]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Allows to make the field which does not exist in database table.\nExamples: add custom show field with user country flag:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-ts",children:"{\n label: 'Country Flag',\n type: AdminForthDataTypes.STRING,\n virtual: true,\n showIn: {\n [AdminForthResourcePages.edit]: false,\n [AdminForthResourcePages.create]: false,\n [AdminForthResourcePages.filter]: false,\n },\n components: {\n show: '@@/CountryFlag.vue',\n list: '@@/CountryFlag.vue',\n },\n}\n"})}),"\n",(0,r.jsxs)(n.p,{children:["This field will be displayed in show and list views with custom component ",(0,r.jsx)(n.code,{children:"CountryFlag.vue"}),". CountryFlag.vue should be placed in custom folder and can be next:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-html",children:"<template>\n {{ getFlagEmojiFromIso(record.ipCountry) }}\n</template>\n\n<script setup>\nconst props = defineProps(['record']);\n\nfunction getFlagEmojiFromIso(iso) {\n return iso.toUpperCase().replace(/./g, (char) => String.fromCodePoint(char.charCodeAt(0) + 127397));\n}\n<\/script>\n"})}),"\n",(0,r.jsx)(n.h4,{id:"inherited-from-29",children:"Inherited from"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon",children:(0,r.jsx)(n.code,{children:"AdminForthResourceColumnInputCommon"})})," . ",(0,r.jsx)(n.a,{href:"/docs/api/Common/interfaces/AdminForthResourceColumnInputCommon#virtual",children:(0,r.jsx)(n.code,{children:"virtual"})})]})]})}function m(e={}){const{wrapper:n}={...(0,d.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},8453:(e,n,o)=>{o.d(n,{R:()=>s,x:()=>l});var i=o(6540);const r={},d=i.createContext(r);function s(e){const n=i.useContext(d);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),i.createElement(d.Provider,{value:n},e.children)}}}]);