fix(Computer): update selectFirstRowOnMount logic

* Introduce selectFirstRowOnMount to manage row selection on component mount.
* Update useEffect dependencies to include selectFirstRowOnMount.
* Ensure first row selection logic handles cases where keyField is not defined.
This commit is contained in:
Hein
2026-01-23 10:09:59 +02:00
parent 1fb57d3454
commit 9c64217b72
2 changed files with 20 additions and 3 deletions

View File

@@ -36,6 +36,7 @@ function _GlidlerAPIAdaptorForGoLangv2<T = unknown>(props: GlidlerAPIAdaptorForG
const searchStr = getState('searchStr');
const searchFields = getState('searchFields');
const _active_requests = getState('_active_requests');
const keyField = getState('keyField');
setState('loadingData', true);
try {
//console.log('APIAdaptorGoLangv2', { _active_requests, index, pageSize, props });
@@ -113,6 +114,12 @@ function _GlidlerAPIAdaptorForGoLangv2<T = unknown>(props: GlidlerAPIAdaptorForG
col_ids?.push(props.hotfields.join(','));
}
if (keyField) {
if (!col_ids.includes(keyField)) {
col_ids.push(keyField);
}
}
if (col_ids && col_ids.length > 0) {
ops.push({
type: 'select-fields',