mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 18:44:16 +00:00
support render tab footer
This commit is contained in:
parent
0f852e909b
commit
964821a97a
@ -76,7 +76,9 @@ export default class SettingTab extends React.Component {
|
||||
if (this.props.withGroups) {
|
||||
const group = composeGroupsFromSettingsTab(this.tab.settings)
|
||||
|
||||
return Object.entries(group).map(([groupKey, settings], index) => {
|
||||
return <>
|
||||
{
|
||||
Object.entries(group).map(([groupKey, settings], index) => {
|
||||
const fromDecoratorIcon = groupsDecorators[groupKey]?.icon
|
||||
const fromDecoratorTitle = groupsDecorators[groupKey]?.title
|
||||
|
||||
@ -106,7 +108,17 @@ export default class SettingTab extends React.Component {
|
||||
})
|
||||
}
|
||||
|
||||
return this.tab.settings.map((setting, index) => {
|
||||
{
|
||||
this.tab.footer && React.createElement(this.tab.footer, {
|
||||
ctx: this.state.processedCtx
|
||||
})
|
||||
}
|
||||
</>
|
||||
}
|
||||
|
||||
return <>
|
||||
{
|
||||
this.tab.settings.map((setting, index) => {
|
||||
return <SettingItemComponent
|
||||
key={index}
|
||||
setting={setting}
|
||||
@ -114,4 +126,12 @@ export default class SettingTab extends React.Component {
|
||||
/>
|
||||
})
|
||||
}
|
||||
|
||||
{
|
||||
this.tab.footer && React.createElement(this.tab.footer, {
|
||||
ctx: this.state.processedCtx
|
||||
})
|
||||
}
|
||||
</>
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user