Skip to content

Commit

Permalink
Merge pull request #194 from webitel/fix/add-reset-in-refresh-table
Browse files Browse the repository at this point in the history
fix: add reset in refresh table[WTEL-5711](https://webitel.atlassian.…
  • Loading branch information
Lera24 authored Dec 16, 2024
2 parents 1bacfd9 + a2c65c6 commit 3d29bec
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
:disabled:add="!hasCreateAccess"
:disabled:delete="!selected.length"
@click:add="router.push({ name: `${CrmSections.SLAS}-card`, params: { id: 'new' }})"
@click:refresh="loadData"
@click:refresh="refresh"
@click:delete="askDeleteConfirmation({
deleted: selected,
callback: () => deleteData(selected),
Expand Down Expand Up @@ -203,6 +203,14 @@ const {
image: imageEmpty,
text: textEmpty,
} = useTableEmpty({ dataList, filters, error, isLoading });
const refresh = () => {
// https://webitel.atlassian.net/browse/WTEL-5711
// because 'selected' needs to be updated [WTEL-5711]
resetState();
loadData();
};
</script>

<style lang="scss" scoped>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
:include="[IconAction.ADD, IconAction.REFRESH, IconAction.DELETE]"
:disabled:delete="!selected.length"
@click:add="router.push({ ...route, params: { conditionId: 'new' } })"
@click:refresh="loadData"
@click:refresh="refresh"
@click:delete="askDeleteConfirmation({
deleted: selected,
callback: () => deleteData(selected),
Expand Down Expand Up @@ -206,6 +206,14 @@ const {
text: textEmpty,
} = useTableEmpty({ dataList, filters, error, isLoading });
const refresh = () => {
// https://webitel.atlassian.net/browse/WTEL-5711
// because 'selected' needs to be updated [WTEL-5711]
resetState();
loadData();
};
</script>

<style lang="scss" scoped>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
:disabled:add="!hasCreateAccess"
:disabled:delete="!selected.length"
@click:add="router.push({ name: `${CrmSections.SOURCES}-card`, params: { id: 'new' }})"
@click:refresh="loadData"
@click:refresh="refresh"
@click:delete="askDeleteConfirmation({
deleted: selected,
callback: () => deleteData(selected),
Expand Down Expand Up @@ -202,6 +202,14 @@ const {
image: imageEmpty,
text: textEmpty,
} = useTableEmpty({ dataList, filters, error, isLoading });
const refresh = () => {
// https://webitel.atlassian.net/browse/WTEL-5711
// because 'selected' needs to be updated [WTEL-5711]
resetState();
loadData();
};
</script>

<style lang="scss" scoped>
Expand Down

0 comments on commit 3d29bec

Please sign in to comment.