Skip to content

Commit

Permalink
fix: hide additional actions on identity overrides tab in Edge (#3135)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewelwell authored Dec 11, 2023
1 parent b1fb768 commit 5e0093e
Showing 1 changed file with 46 additions and 40 deletions.
86 changes: 46 additions & 40 deletions frontend/web/components/modals/CreateFlag.js
Original file line number Diff line number Diff line change
Expand Up @@ -1337,20 +1337,22 @@ const CreateFlag = class extends Component {
</Tooltip>
}
action={
<Button
onClick={() =>
this.changeIdentity(
this.state.userOverrides,
)
}
type='button'
theme='secondary'
size='small'
>
{enabledIndentity
? 'Enable All'
: 'Disable All'}
</Button>
!Utils.getIsEdge() && (
<Button
onClick={() =>
this.changeIdentity(
this.state.userOverrides,
)
}
type='button'
theme='secondary'
size='small'
>
{enabledIndentity
? 'Enable All'
: 'Disable All'}
</Button>
)
}
items={this.state.userOverrides}
paging={
Expand All @@ -1373,32 +1375,35 @@ const CreateFlag = class extends Component {
this.userOverridesPage(page)
}
searchPanel={
<div className='text-center mt-2 mb-2'>
<Flex className='text-left'>
<IdentitySelect
isEdge={false}
ignoreIds={this.state.userOverrides?.map(
(v) => v.identity?.id,
)}
environmentId={
this.props.environmentId
}
data-test='select-identity'
placeholder='Create an Identity Override...'
value={
this.state.selectedIdentity
}
onChange={(
selectedIdentity,
) =>
this.setState(
{ selectedIdentity },
this.addItem,
)
}
/>
</Flex>
</div>
!Utils.getIsEdge() && (
<div className='text-center mt-2 mb-2'>
<Flex className='text-left'>
<IdentitySelect
isEdge={false}
ignoreIds={this.state.userOverrides?.map(
(v) => v.identity?.id,
)}
environmentId={
this.props.environmentId
}
data-test='select-identity'
placeholder='Create an Identity Override...'
value={
this.state
.selectedIdentity
}
onChange={(
selectedIdentity,
) =>
this.setState(
{ selectedIdentity },
this.addItem,
)
}
/>
</Flex>
</div>
)
}
renderRow={({
enabled,
Expand All @@ -1425,6 +1430,7 @@ const CreateFlag = class extends Component {
identity,
})
}
disabled={Utils.getIsEdge()}
/>
</div>
<div className='font-weight-medium fs-small lh-sm'>
Expand Down

3 comments on commit 5e0093e

@vercel
Copy link

@vercel vercel bot commented on 5e0093e Dec 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 5e0093e Dec 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 5e0093e Dec 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

docs – ./docs

docs-git-main-flagsmith.vercel.app
docs.flagsmith.com
docs-flagsmith.vercel.app
docs.bullet-train.io

Please sign in to comment.