JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › Data Grid › Infinite Scroll added new row was not selective.
Tagged: Infinitescroll
- This topic has 6 replies, 2 voices, and was last updated 1 year, 4 months ago by svetoslav_borislavov.
-
AuthorPosts
-
June 16, 2023 at 6:09 am #107234gizmo80Participant
Hi.
I’m testing Smart.grid in Vue3.
Testing the “Infinite” scroll, I found that the newly added ROW was not selective.
But I don’t know if it’s a bug or something wrong.
Please check my source…
<div><template></div>
<div><smart-grid id=”grid” ref=”grid”></smart-grid></div>
<div></template></div>
<div><script></div>
<div>import “smart-webcomponents/source/styles/smart.default.css”;</div>
<div>import “smart-webcomponents/source/modules/smart.grid.js”;</div>
<div>import doRequest from “../../assets/common/common”;</div>
<div>import {tempList} from “@/assets/common/tempList”;</div>
<div>import _ from ‘lodash'</div>
<div>export default {</div>
<div>name: “imageFile”,</div>
<div>data(){</div>
<div>return{</div>
<div>pageNum: 0,</div>
<div>listData: null,</div>
<div>grid: null</div>
<div>}</div>
<div>},</div>
<div>mounted() {</div>
<div>window.Smart(“#grid”,</div>
<div>class {</div>
<div></div>
<div>get properties() {</div>
<div>return {</div>
<div>scrolling: “infinite”,</div>
<div>appearance: {</div>
<div>showRowHeader: true,</div>
<div>allowHover: true,</div>
<div>showRowHeaderNumber: true</div>
<div>},</div>
<div>sorting: {</div>
<div>enabled: false</div>
<div>},</div>
<div>selection: {</div>
<div>allowCellSelection: true,</div>
<div>enabled: true,</div>
<div>// allowCellSelection: true,</div>
<div>allowRowHeaderSelection: true,</div>
<div>// allowColumnHeaderSelection: true,</div>
<div>mode: ‘extended'</div>
<div>},</div>
<div>columns: [</div>
<div>{ label: ‘품목코드’, dataField: ‘itemSeq’, align: “center”, cellsAlign: “left”, width:100},</div>
<div>{ label: ‘이미지’, dataField: ‘image’, align: “center”, cellsAlign: “left”, width:100,</div>
<div>template: (object) => {</div>
<div>object.template =<img src='data:image/png;base64,${object.value}' width='100px'/>
</div>
<div>}</div>
<div>},</div>
<div>{ label: ‘품명’, dataField: ‘itemName’, align: “center”, cellsAlign: “left”, width:500},</div>
<div>{ label: ‘품번’, dataField: ‘itemNo’, allowHide:true, width:200 },</div>
<div>{ label: ‘규격’, dataField: ‘spec’, width:200 },</div>
<div>{ label: ‘단위’, dataField: ‘unitName’, width:200 },</div>
<div>{ label: ‘단가’, dataField: ‘price’, width:200 },</div>
<div>],</div>
<div></div>
<div>};</div>
<div>}</div>
<div>}</div>
<div>);</div>
<div></div>
<div>this.$refs.grid.dataSource = new window.Smart.DataAdapter({</div>
<div>virtualDataSourceCache: true,</div>
<div>virtualDataSource: (resultCallback, details)=>{</div>
<div>console.log(“virtualDataSource”, details)</div>
<div>doRequest(“post”, “./getProductListForBase64.do”, {pageNum: ++this.pageNum, rowPerPage: 20})</div>
<div>.then(result => {</div>
<div>let dataList = _.isUndefined(result.data.list)?tempList:result.data.list</div>
<div>console.log(“dataList.length”, dataList.length)</div>
<div>setTimeout(()=>{</div>
<div>resultCallback({</div>
<div>dataSource: dataList,</div>
<div>// virtualDataSourceLength: dataList.length</div>
<div>})</div>
<div>}, 100)</div>
<div></div>
<div>})</div>
<div>},</div>
<div>id: ‘itemSeq'</div>
<div>})</div>
<div>},</div>
<div>methods:{</div>
<div></div>
<div>},</div>
<div>};</div>
<div></div>
<div></script></div>
<div><style scoped></div>
<div></div>
<div></style></div>
June 19, 2023 at 8:53 am #107244svetoslav_borislavovParticipantHi,
Which version of Smart are you using?
I could not reproduce the problem as you can see from the following demo project:
https://easyupload.io/dw3qzcYou may edit it and resend it to us.
Best Regards,
Svetoslav BorislavovSmart UI Team
https://www.htmlelements.com/June 20, 2023 at 1:52 am #107245gizmo80ParticipantSee reproduced demo project source.
Only 1 to 20 rows are selected, and subsequent selections are not possible.Same problem with 15.2.1 used in my project.
- This reply was modified 1 year, 5 months ago by gizmo80.
June 20, 2023 at 5:27 am #107247gizmo80ParticipantThis is recording video.
June 21, 2023 at 2:34 am #107253svetoslav_borislavovParticipantHi,
Thank you for reporting the problem!
I have opened an issue for it.Meanwhile, if you have any other questions, do not hesitate to contact us!
Best Regards,
Svetoslav BorislavovSmart UI Team
https://www.htmlelements.com/July 5, 2023 at 2:54 am #107434gizmo80ParticipantWould it be possible for this issue to be resolved in the next release?
July 5, 2023 at 6:03 am #107435svetoslav_borislavovParticipantHi,
Yes, the problem is fixed in the next release!
If you need any further assistance, do not hesitate to contact us!Best Regards,
Svetoslav BorislavovSmart UI Team
https://www.htmlelements.com/ -
AuthorPosts
- You must be logged in to reply to this topic.