-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(form): rework ui schema settings
- Loading branch information
Showing
7 changed files
with
95 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { Collapse } from "antd"; | ||
|
||
// For use in fieldTypes for the PropKeyEditor | ||
const CollapseObjectFieldTemplate = ({ properties }) => { | ||
const [first, ...rest] = properties; | ||
const elements = [first, { title: "Field UI Options", content: rest }]; | ||
|
||
return ( | ||
<Collapse | ||
style={{ margin: "0 10px 10px 10px" }} | ||
defaultActiveKey={Array.from(Array(properties.length).keys())} | ||
expandIconPosition="right" | ||
items={elements.map((item, index) => ({ | ||
key: index, | ||
label: item.title || item.content.props.schema.title, | ||
children: item.content.length | ||
? item.content.map((i) => i.content) | ||
: item.content, | ||
}))} | ||
/> | ||
); | ||
}; | ||
|
||
export default CollapseObjectFieldTemplate; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import ObjectFieldTemplate from "./ObjectFieldTemplate"; | ||
|
||
const NoTitleObjectFieldTemplate = (props) => { | ||
return <ObjectFieldTemplate {...props} hideHeader />; | ||
}; | ||
|
||
export default NoTitleObjectFieldTemplate; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters