Skip to content
This repository has been archived by the owner on Dec 13, 2020. It is now read-only.

Commit

Permalink
work in progress #1095
Browse files Browse the repository at this point in the history
  • Loading branch information
Dunkat committed Jul 31, 2017
1 parent 45d1d5c commit 9f9d6d5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/components/widget/List/List.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class List extends Component {
const {
rank, readonly, defaultValue, selected, align, updated, rowId,
emptyText, tabIndex, mandatory, validStatus, lookupList, autofocus,
blur, initialFocus
blur, initialFocus, lastProperty, focusMainLookup
} = this.props;
const {list, loading, selectedItem} = this.state;

Expand All @@ -121,6 +121,8 @@ class List extends Component {
lookupList={lookupList}
blur={blur}
initialFocus={initialFocus}
lastProperty={lastProperty}
focusMainLookup={focusMainLookup}
/>
)
}
Expand Down
7 changes: 6 additions & 1 deletion src/components/widget/List/RawList.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,18 @@ class RawList extends Component {
componentDidUpdate = (prevProps, prevState) => {
const {
list, mandatory, defaultValue, autofocus, blur, property,
initialFocus, selected, doNotOpenOnFocus
initialFocus, selected, doNotOpenOnFocus, lastProperty, loading,
focusMainLookup
} = this.props;

if(prevProps.blur != blur){
blur && this.handleBlur();
}

if(list.length > 0 && (prevProps.loading != loading) && loading === false && lastProperty){
// this.dropdown.focus();
}

if(this.dropdown && autofocus) {
this.dropdown.focus();
if (prevState.selected !== this.state.selected) {
Expand Down
1 change: 1 addition & 0 deletions src/components/widget/Lookup/Lookup.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ class Lookup extends Component {
initialFocus={
index===0 ? initialFocus : false
}
lastProperty={properties[properties.length-1].field === property ? true : false}
setNextProperty={this.setNextProperty}
mainProperty={[item]}
blur={!property?true:false}
Expand Down

0 comments on commit 9f9d6d5

Please sign in to comment.