Skip to content

Commit

Permalink
Merge pull request #36 from agentlab/issue-35-cards=horizontal-scroll…
Browse files Browse the repository at this point in the history
…er-window-size

GH-35 Windows size problem in Cards Horizontal Scroller
  • Loading branch information
amivanoff authored Oct 4, 2021
2 parents 2e9949e + 79c0db0 commit d76d30c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/data-controls/HorizontalScroll/HorizontalScroll.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ export const HorizontalScrollRenderer: React.FC<any> = (props) => {

const onUpdate = ({ isLastItemVisible }: scrollVisibilityApiType) => {
if (isLastItemVisible) {
const newDataSource = dataSource.concat(getData());
//const newDataSource = dataSource.concat(getData());
console.log('push new items');
setDataSource(newDataSource);
//setDataSource(newDataSource);
}
};

Expand All @@ -84,7 +84,7 @@ export const HorizontalScrollRenderer: React.FC<any> = (props) => {
key={data['@id']}
itemId={data['@id']}
onClick={handleItemClick(data['@id'])}
style={viewKindElement.options.style}>
style={viewKindElement.options.templateStyle}>
{createCell(data, idx)}
</Card>
))}
Expand Down
2 changes: 1 addition & 1 deletion stories/CardsHorizontalScroller.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const viewKinds = [
resultsScope: 'mktp:ProductCards_in_Product_Coll',
options: {
renderType: 'horizontalScroll',
style: {
templateStyle: {
width: '260px',
},
elementTemplate: [
Expand Down

0 comments on commit d76d30c

Please sign in to comment.