You need to make all the row data have same length.
in this case, add two data like 'empty string' to each row except the head row.
Hi @Kevinkun
Firstly great thanks for your great effort. This extension is amazing.
But I have small scroll problem with old devices (android 7.1.2).
If I fix the first row, some devices(especially old devices) can't scroll to the row 1. Even if I wait about 2 seconds after showTable block, it doesn't scroll (stays previous scroll position). However, If I scroll to row 2, it works without waiting .
By the way, showtable block doesn't also scroll to first row in the devices that I have the previous problem.
If I don't fix the first row, everything works without problem for all devices.
I am using version 6.1 of extension.
What can be the problem and how can I resolve?
Thanks in advance.
Can you make an example AIA project that demonstrates this problem? Also, older devices: android versions? Makes and models?
Hi again. please,
Click button.
Scroll the table down.
close the bottom sheet by clicking anywhere outside of table.
again click button. Table will be shown at previous scroll position in some devices.
then, please disable the SetStyleSheet block which fixes the first row and refresh the screen.
Do the procedure above. It scrolls up the row 1 successfully.
then, please re-enable the SetStyleSheet block. change row value of scrollTo block from 1 to 2. refresh the screen.
Do the procedure above. It scrolls up the row 2 successfully while first row is fixed.
Devices are Samsung GT-I9082 (Android 7.1.2 AICP Rom), Samsung S7 edge (Android 10).
You may not reproduce that problem in your environment. I can provide video or logs about problem to you.
Because I have to use bottom sheet, I can't scroll up again onces I scroll down.
scroll_problem.aia (51.2 KB)
Why not tell us you are developing on Kodular ?
You example project is of no use on AI2 because it contains Kodular specific components. (e.g. BottomSheet)
Ask on Kodular community.
Because problem is not related with neither bottom sheet nor kodular. I thought, it may be related with extension and this is the main topic about this extention.
This is MIT appinventor version of the project. I removed bottom sheet and tested with MIT appinventor. Problem still exists.
By the way, I realized that the scrollTo problem is not related with older devices. I have just tried with Samsung S22 Ultra Android 13 and scrollTo acts same (scrolling not working).
However, showtable block acts different between older devices and newer devices. On newer devices, showtable block scrolls to row 1 automatically, but on Samsung GT-I9082 showtable block doesn't scroll to row 1, stays at same position.
Thanks in advance.
scroll_problem_mit(1).aia (50.6 KB)
OK, will take a look. Helps to remove all the other variables that could be causing an issue!
Yes, an issue with this, @Kevinkun will need to take a look
Even happens if you do not set has head to true, and fix tr:first-child to the top.
How can I change the header text color?
Something like:
th {color:red}
this should also work:

Is there any update from that problem?
I have checked this issue, and still can not find a solution.
the ScrollTo method seems not working when header is fixed.
Now one workaround is to use another copy of this extension to make a one-row table on top of the data table. and you may also need more css to adjust the width of each column.
Firstly, thanks for your time.
Q1) Is there another way to fix the first row that doesn't effect the ScrollTo block? (runJs, etc)
Q2)How about show table block?
You can most probably try a javascript function to scroll you to the top.....
Something like this?
const elmnt = document.querySelector("table tr:first-child");
elmnt.scrollIntoView({behavior: "smooth", block: "start", inline: "nearest"});
this maybe because different phone use different webview, which support different javascript.
As @TIMAI2 said, you can try some js to scroll up after showtable.
you can test by yourself using native Webviewer +html+css+js.
Thank you very much. I think, this is the best workaround of that scrollTo problem.
How to do rounded corner with shadows like below image
Note: In below image shadows around table is not displayed, but I want shadows also to display the table as card
If it can be done, use CSS for this.

