Skip to content

Commit

Permalink
Merge pull request wso2#1 from prasa7/support-9.0.174.x.fix
Browse files Browse the repository at this point in the history
Added the subscription search box apearance only when subscriptions are there
  • Loading branch information
chanaka3d committed May 19, 2022
2 parents 63089e6 + aa2e4ee commit 03706fc
Showing 1 changed file with 28 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -876,32 +876,34 @@ class SubscriptionsTable extends Component {
/>
</Typography>
</Box>
<Box>
<TextField
style={{ width: 400 }}
autoFocus
id='subscription-search-box'
label={intl.formatMessage({
id: 'Apis.Details.Subscriptions.SubscriptionsTable.search.label',
defaultMessage: 'Search',
})}
placeholder={intl.formatMessage({
id: 'Apis.Details.Subscriptions.SubscriptionsTable.search.placeholder',
defaultMessage: 'Subscriber Name',
})}
margin='dense'
variant='outlined'
value={searchQuery || ''}
onChange={this.filterSubscriptions}
InputLabelProps={{
shrink: true,
}}
helperText={intl.formatMessage({
id: 'Apis.Details.Subscriptions.SubscriptionsTable.search.help',
defaultMessage: 'Filter subscriptions by subscriber name',
})}
/>
</Box>
{subscriptions.length > 0 && (
<Box>
<TextField
style={{ width: 400 }}
autoFocus
id='subscription-search-box'
label={intl.formatMessage({
id: 'Apis.Details.Subscriptions.SubscriptionsTable.search.label',
defaultMessage: 'Search',
})}
placeholder={intl.formatMessage({
id: 'Apis.Details.Subscriptions.SubscriptionsTable.search.placeholder',
defaultMessage: 'Subscriber Name',
})}
margin='dense'
variant='outlined'
value={searchQuery || ''}
onChange={this.filterSubscriptions}
InputLabelProps={{
shrink: true,
}}
helperText={intl.formatMessage({
id: 'Apis.Details.Subscriptions.SubscriptionsTable.search.help',
defaultMessage: 'Filter subscriptions by subscriber name',
})}
/>
</Box>
)}
</div>
<Paper elevation={0}>
{subscriptions.length > 0 ? (
Expand Down

0 comments on commit 03706fc

Please sign in to comment.