JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › Data Grid › Selection checkbox and height auto noisy effect.
- This topic has 7 replies, 2 voices, and was last updated 1 week ago by
tbettinazzi@axioma.it.
-
AuthorPosts
-
July 22, 2025 at 1:38 pm #112708
tbettinazzi@axioma.it
ParticipantIve a grid with defined ad is shown below.
The grid has selection checboxes.
At present the grid contains 3 rows.
When I click on a checkbox a part of the last row seem to fall below the lower limit of the grid.
What’s wrong ? How can I avoid this ?
Tks
smart-grid</span> {
width 100%;
height auto;}
-
This topic was modified 1 week, 3 days ago by
tbettinazzi@axioma.it.
July 22, 2025 at 2:15 pm #112711Markov
KeymasterHi,
If it’s necessary, set the min-height CSS prop as well.
Regards,
MarkovSmart UI Team
https://www.htmlelements.com/July 22, 2025 at 4:37 pm #112721tbettinazzi@axioma.it
ParticipantAt what value ?
The row doesn’t disappear, simply a part of the row (say 20%) alls below the grid limit.
Tks
July 23, 2025 at 9:44 am #112728tbettinazzi@axioma.it
ParticipantDone, but id min-height is not larger than the number of rows represented the noisy effect still reproduces.
It seems as if the checkbox is clicked the row heigth become a little bit larger falling under the grid lower line.
July 24, 2025 at 12:55 pm #112737Markov
KeymasterHi,
The change event in Smart.Grid is triggered every time the selection changes, including when you click the same row twice.
So when you click the same row twice, it fires twice, but both have the same payload because the grid does not internally track a “previous state” for you.` const data = [
{ Name: ‘John’, Age: 30 },
{ Name: ‘Alice’, Age: 25 },
{ Name: ‘Mark’, Age: 28 }
];window.Smart(‘#grid’, class {
get properties() {
return {
selection: true,
dataSource: new Smart.DataAdapter({
dataSource: data,
dataFields: [
‘Name: string’,
‘Age: number’
]
}),
columns: [
{ label: ‘Name’, dataField: ‘Name’ },
{ label: ‘Age’, dataField: ‘Age’ }
]
};
}
});const grid = document.querySelector(‘#grid’);
let previousSelection = [];
grid.addEventListener(‘change’, function (event) {
const currentSelection = grid.getSelection();console.log(‘Previous:’, previousSelection);
console.log(‘Current:’, currentSelection);// Compare changes
if (JSON.stringify(previousSelection) !== JSON.stringify(currentSelection)) {
console.log(‘Selection changed!’);
}previousSelection = […currentSelection];
});`Best Regards,
MarkovSmart UI Team
https://www.htmlelements.com/July 25, 2025 at 7:10 am #112748tbettinazzi@axioma.it
ParticipantTks for Your answer but that answer was for another question i posted.
In this post I’m asking about the noisy effect when the min-heght is lower than the space needed for all rows and the user clicks on the checkbox.
Tks
July 25, 2025 at 9:02 am #112752Markov
KeymasterHi,
There should be enough space for the ripple efrect to be fully shown i.e you need to set the height and min height if necessary
Regards
MarkovJuly 25, 2025 at 11:05 am #112754tbettinazzi@axioma.it
ParticipantFixing height to leave enough space for ripple presuppose to know how many rows we have, but owing that rows come from a query on the DB I can’t know, a priori, how many rows I’ve.
It would be usefull to have an auto sizing of the height + some small fixed amount for the ripple effect.
Tks
-
This topic was modified 1 week, 3 days ago by
-
AuthorPosts
- You must be logged in to reply to this topic.