fix(xo-web/DropdownButton): add required id prop (#5628)

See https://react-bootstrap.netlify.app/components/dropdowns/#dropdown-button-props
This commit is contained in:
Mathieu 2021-03-04 15:56:01 +01:00 committed by GitHub
parent a4b209c654
commit eeebd3fc1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -744,6 +744,7 @@ class SortedTable extends Component {
onSelect,
paginationContainer,
shortcutsTarget,
stateUrlParam,
} = props
const { all, itemsPerPage } = state
const groupedActions = this._getGroupedActions()
@ -769,7 +770,7 @@ class SortedTable extends Component {
)
const dropdownItemsPerPage = (
<DropdownButton bsStyle='info' title={itemsPerPage}>
<DropdownButton bsStyle='info' id={stateUrlParam} title={itemsPerPage}>
{ITEMS_PER_PAGE_OPTIONS.map(nItems => (
<MenuItem key={nItems} onClick={() => this._setNItemsPerPage(nItems)}>
{nItems}

View File

@ -1187,7 +1187,7 @@ export default class Home extends Component {
<Button onClick={this._expandAll}>
<Icon icon='nav' />
</Button>{' '}
<DropdownButton bsStyle='info' title={homeItemsPerPage}>
<DropdownButton bsStyle='info' id='itemsPerPage' title={homeItemsPerPage}>
{ITEMS_PER_PAGE_OPTIONS.map(nItems => (
<MenuItem key={nItems} onClick={() => this._setNItemsPerPage(nItems)}>
{nItems}