fix(grid): preserve structured filter conditions on refresh and rollback
The toolbar refresh, rollback, and post-save reload were passing only the manual WHERE input to the reload event, discarding structured filter conditions added via the filter builder popover. Changed all three call sites to use currentWhereInput() which combines both filter sources.
This commit is contained in:
parent
6016b293ce
commit
bbe51d409c
|
|
@ -1987,6 +1987,7 @@ const editor = useDataGridEditor({
|
|||
sql: computed(() => props.sql),
|
||||
searchText,
|
||||
whereFilterInput,
|
||||
currentWhereInput: computed(() => currentWhereInput()),
|
||||
orderByInput,
|
||||
rowStatusFilter,
|
||||
initialEditColumn: firstVisibleColumnIndex,
|
||||
|
|
@ -2101,7 +2102,7 @@ async function onToolbarRefresh() {
|
|||
"reload",
|
||||
props.sql,
|
||||
searchText.value,
|
||||
whereFilterInput.value.trim() || undefined,
|
||||
currentWhereInput(),
|
||||
currentOrderBy(),
|
||||
pageSize.value,
|
||||
(currentPage.value - 1) * pageSize.value,
|
||||
|
|
@ -2119,7 +2120,7 @@ function onToolbarRollback() {
|
|||
"reload",
|
||||
props.sql,
|
||||
searchText.value,
|
||||
whereFilterInput.value.trim() || undefined,
|
||||
currentWhereInput(),
|
||||
currentOrderBy(),
|
||||
pageSize.value,
|
||||
(currentPage.value - 1) * pageSize.value,
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ export interface UseDataGridEditorOptions {
|
|||
sql: ComputedRef<string | undefined>;
|
||||
searchText: Ref<string>;
|
||||
whereFilterInput: Ref<string>;
|
||||
currentWhereInput: ComputedRef<string | undefined>;
|
||||
orderByInput: Ref<string>;
|
||||
rowStatusFilter: Ref<RowStatusFilter>;
|
||||
initialEditColumn?: ComputedRef<number>;
|
||||
|
|
@ -107,7 +108,6 @@ export function useDataGridEditor(options: UseDataGridEditorOptions) {
|
|||
customSave,
|
||||
sql,
|
||||
searchText,
|
||||
whereFilterInput,
|
||||
orderByInput,
|
||||
rowStatusFilter,
|
||||
initialEditColumn,
|
||||
|
|
@ -633,7 +633,7 @@ export function useDataGridEditor(options: UseDataGridEditorOptions) {
|
|||
"reload",
|
||||
sql.value,
|
||||
searchText.value,
|
||||
whereFilterInput.value.trim() || undefined,
|
||||
options.currentWhereInput.value,
|
||||
orderByInput.value.trim() || undefined,
|
||||
pageSize.value,
|
||||
(currentPage.value - 1) * pageSize.value,
|
||||
|
|
|
|||
Loading…
Reference in New Issue