Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion packages/web/src/components/list/MultiDropdownList.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,13 @@ class MultiDropdownList extends Component {
this.updateQueryOptions(this.props, true);
};

handleKeyPress = (e) => {
if (e.key === 'Enter' || e.key === ' ') {
e.preventDefault();
this.handleLoadMore();
}
};

handleChange = (e) => {
let currentValue = e;
if (isEvent(e)) {
Expand Down Expand Up @@ -424,7 +431,12 @@ class MultiDropdownList extends Component {
showLoadMore
&& !isLastBucket && (
<div css={loadMoreContainer}>
<Button disabled={isLoading} onClick={this.handleLoadMore}>
<Button
disabled={isLoading}
onClick={this.handleLoadMore}
onKeyPress={this.handleKeyPress}
tabIndex={0}
>
{loadMoreLabel}
</Button>
</div>
Expand Down
14 changes: 13 additions & 1 deletion packages/web/src/components/list/MultiList.js
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,13 @@ class MultiList extends Component {
this.props.loadMore(this.props.componentId, queryOptions);
};

handleKeyPress = (e) => {
if (e.key === 'Enter' || e.key === ' ') {
e.preventDefault();
this.handleLoadMore();
}
};

renderSearch = () => {
if (this.props.showSearch) {
return (
Expand Down Expand Up @@ -594,7 +601,12 @@ class MultiList extends Component {
: this.props.renderNoResults && this.props.renderNoResults()}
{showLoadMore && !isLastBucket && (
<div css={loadMoreContainer}>
<Button disabled={isLoading} onClick={this.handleLoadMore}>
<Button
disabled={isLoading}
onClick={this.handleLoadMore}
onKeyPress={this.handleKeyPress}
tabIndex={0}
>
{loadMoreLabel}
</Button>
</div>
Expand Down
14 changes: 13 additions & 1 deletion packages/web/src/components/list/SingleDropdownList.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,13 @@ class SingleDropdownList extends Component {
this.updateQueryOptions(this.props, true);
};

handleKeyPress = (e) => {
if (e.key === 'Enter' || e.key === ' ') {
e.preventDefault();
this.handleLoadMore();
}
};

handleChange = (e) => {
let currentValue = e;
if (isEvent(e)) {
Expand Down Expand Up @@ -333,7 +340,12 @@ class SingleDropdownList extends Component {
showLoadMore
&& !isLastBucket && (
<div css={loadMoreContainer}>
<Button disabled={isLoading} onClick={this.handleLoadMore}>
<Button
disabled={isLoading}
onClick={this.handleLoadMore}
onKeyPress={this.handleKeyPress}
tabIndex={0}
>
{loadMoreLabel}
</Button>
</div>
Expand Down
14 changes: 13 additions & 1 deletion packages/web/src/components/list/SingleList.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,13 @@ class SingleList extends Component {
this.props.loadMore(this.props.componentId, queryOptions);
};

handleKeyPress = (e) => {
if (e.key === 'Enter' || e.key === ' ') {
e.preventDefault();
this.handleLoadMore();
}
};

renderSearch = () => {
if (this.props.showSearch) {
return (
Expand Down Expand Up @@ -485,7 +492,12 @@ class SingleList extends Component {
: this.props.renderNoResults && this.props.renderNoResults()}
{showLoadMore && !isLastBucket && (
<div css={loadMoreContainer}>
<Button disabled={isLoading} onClick={this.handleLoadMore}>
<Button
disabled={isLoading}
onClick={this.handleLoadMore}
onKeyPress={this.handleKeyPress}
tabIndex={0}
>
{loadMoreLabel}
</Button>
</div>
Expand Down