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

Commit

Permalink
Update List component to use getViewAttributeDropdown for viewAttributes
Browse files Browse the repository at this point in the history
  • Loading branch information
wiadev committed Dec 2, 2017
1 parent 7b7ba49 commit 7bca9cb
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions src/components/widget/List/List.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { connect } from 'react-redux';
import RawList from './RawList';

import {
dropdownRequest
dropdownRequest,
getViewAttributeDropdown
} from '../../../actions/GenericActions';

class List extends Component {
Expand Down Expand Up @@ -56,20 +57,28 @@ class List extends Component {
loading: true
});

dropdownRequest({
const propertyName = (filterWidget ?
properties[0].parameterName : properties[0].field
);

const request = attribute ? getViewAttributeDropdown(
windowType,
viewId,
dataId,
propertyName) : dropdownRequest({
attribute,
docId: dataId,
docType: windowType,
entity,
propertyName: (filterWidget ?
properties[0].parameterName : properties[0].field
),
propertyName,
rowId,
subentity,
subentityId,
tabId,
viewId
}).then(res => {
});

request.then(res => {
let values = res.data.values || [];
let singleOption = values && (values.length === 1);

Expand Down

1 comment on commit 7bca9cb

@teosarca
Copy link
Member

Choose a reason for hiding this comment

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

task #1357

Please sign in to comment.