docs(changeset): Updated selected cols bug
This commit is contained in:
@@ -77,6 +77,7 @@ function _GlidlerAPIAdaptorForGoLangv2<T = unknown>(props: GlidlerAPIAdaptorForG
|
||||
(f) =>
|
||||
!f.disableFilter &&
|
||||
!f.disableSearch &&
|
||||
!f.virtual &&
|
||||
((searchFields ?? []).length == 0 || searchFields?.includes(f.id))
|
||||
)
|
||||
?.forEach((filter: any) => {
|
||||
@@ -112,13 +113,6 @@ function _GlidlerAPIAdaptorForGoLangv2<T = unknown>(props: GlidlerAPIAdaptorForG
|
||||
col_ids?.push(props.hotfields.join(','));
|
||||
}
|
||||
|
||||
if (ops && ops.length > 0) {
|
||||
const optionHeaders = GoAPIHeaders(ops);
|
||||
for (const oh in GoAPIHeaders(ops)) {
|
||||
head.set(oh, optionHeaders[oh]);
|
||||
}
|
||||
}
|
||||
|
||||
if (col_ids && col_ids.length > 0) {
|
||||
ops.push({
|
||||
type: 'select-fields',
|
||||
@@ -126,6 +120,13 @@ function _GlidlerAPIAdaptorForGoLangv2<T = unknown>(props: GlidlerAPIAdaptorForG
|
||||
});
|
||||
}
|
||||
|
||||
if (ops && ops.length > 0) {
|
||||
const optionHeaders = GoAPIHeaders(ops);
|
||||
for (const oh in GoAPIHeaders(ops)) {
|
||||
head.set(oh, optionHeaders[oh]);
|
||||
}
|
||||
}
|
||||
|
||||
const currentRequestIndex = _active_requests?.findIndex((f) => f.page === index) ?? -1;
|
||||
_active_requests?.forEach((r) => {
|
||||
if ((r.page >= 0 && r.page < index - 2) || (index >= 0 && r.page > index + 2)) {
|
||||
@@ -262,7 +263,14 @@ function _GlidlerAPIAdaptorForGoLangv2<T = unknown>(props: GlidlerAPIAdaptorForG
|
||||
|
||||
//Reset the loaded pages to new rules
|
||||
useEffect(() => {
|
||||
loadPage(0, 'all');
|
||||
loadPage(0, 'all').then(() => {
|
||||
const onChange = getState('onChange');
|
||||
const getGridSelectedRows = getState('getGridSelectedRows');
|
||||
if (onChange && typeof onChange === 'function') {
|
||||
const buffers = getGridSelectedRows?.();
|
||||
onChange(buffers);
|
||||
}
|
||||
});
|
||||
}, [JSON.stringify(props.options), props.filter, props.url, props.authtoken]);
|
||||
|
||||
//Reset the function in the store.
|
||||
|
||||
Reference in New Issue
Block a user