mirror of
https://github.com/frappe/books.git
synced 2025-02-02 12:08:27 +00:00
fix: Set filters from route in ListView
This commit is contained in:
parent
185b87bc2b
commit
865bf1f60e
@ -31,8 +31,9 @@ module.exports = {
|
||||
condition: doc => !doc.isNew(),
|
||||
action: customer => {
|
||||
router.push({
|
||||
path: `/list/SalesInvoice`,
|
||||
query: {
|
||||
name: 'ListView',
|
||||
params: {
|
||||
doctype: 'SalesInvoice',
|
||||
filters: {
|
||||
customer: customer.name
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ export default {
|
||||
Icon,
|
||||
FilterDropdown
|
||||
},
|
||||
mounted() {
|
||||
activated() {
|
||||
if (typeof this.filters === 'object') {
|
||||
this.$refs.filterDropdown.setFilter(this.filters);
|
||||
}
|
||||
|
@ -54,10 +54,10 @@ const routes = [
|
||||
},
|
||||
props: {
|
||||
default: route => {
|
||||
const { doctype } = route.params;
|
||||
const { doctype, filters } = route.params;
|
||||
return {
|
||||
doctype,
|
||||
filters: route.query.filters
|
||||
filters
|
||||
};
|
||||
},
|
||||
edit: route => route.query
|
||||
|
Loading…
x
Reference in New Issue
Block a user