Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Listing history url #40

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Listing history url #40

wants to merge 9 commits into from

Conversation

kratochvilam
Copy link

No description provided.

Copy link
Contributor

@palypster palypster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vyzera to spoko. Mame k tomu nejaky upgrade guide? Na co si dat pozor? A kedy to nebude fungovat, ked je co v projekte spravene (nejake examples).

},

filter(column, value) {
//FIXME: filter can be called by child listing components on create to set default filters
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nerozumiem tomu fixme

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

filter je funkcia ktoru mozu child componenty volne volat, problemy to robi ked volaju filter na create componentu (prvotny load stranky). Toto mozu robit komponenty, ktore chcu nastavit defaultne filtre. V takom pripade nam to pokazi tuto funkcionalitu, lebo v podstate nam tym prestavia filtre, ktore by sa inak mali brat z urlky.

O tom je ten FIXME, ale pravdepodobne nema dobre riesenie okrem zapisu do nejakeho upgrade guidu.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a neda sa introducnut nejaka nova metodka, aby sme nepouzivalu taku, ktora je pravdepodobne overridden? nejak inak sa to tam neda hooknut?

if (value == '') {
delete this.filters[column];
} else {
this.filters[column] = value;
}
// when we change filter, we must reset pagination, because the total items count may has changed
this.loadData(true);
if(loadData) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nerozumiem, kedy chces volat filter s loadData=false?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v setParamsFromUrl, nastavujes jednotlive filtre z urlky. Ale nechces pri kazdom nastaveni filtru loadovat data, chces loadovat data len na konci naraz.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aha nieco ako, ze si najprv nastavit jeden filter, potom druhy a na konci das Apply filters a az vtedy to loadne? take nieco?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jo bolo to tak, ale pozeram ze som to potom zmenil a toto je uz neaktualne :)

@@ -268,16 +276,23 @@ export default {
axios.get(this.url, options).then(response => this.populateCurrentStateAndData(response.data.data), error => {
// TODO handle error
});

if(updateUrl) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keduy chces volat loadData s updateUrl=false?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pouziva sa to teraz na event zmeny urlky cez back/forward button. Chces nacitat aktualne data, ale nechces menit url (lebo je uz zmenena)

@kratochvilam kratochvilam marked this pull request as ready for review May 6, 2021 11:52
@palypster
Copy link
Contributor

@timoransky @RichardDominik hodite na toto ockom aj vy plz?

@palypster
Copy link
Contributor

@timoransky one more review please.

Then, @RichardDominik can you make the release?

this.updateFiltersInChildComponents(this.filters);

window.onpopstate = function(event) {
if(_this.dynamicUrl) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nemam rad tieto prebindovavacky this na _this, ale ked asi sa ti to nechce opravovat vsade, tak to nechaj kludne

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cele craftable je pisene tymto stylom, tu som len pokracoval v zadanom trende :) tiez v tom nevidim zmysel, ale tak potom by sme to mali cele refaktorovat

@diegodeluca
Copy link

Sorry, but I cannot realize where to put this fix, can somebody help me, please?
I've made a brand new project, too but when I edit a row, when i came back I loose all filters

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants