sulu / sulu-standard

This repository is not longer the recommended way to start a sulu project. Use:
https://github.com/sulu/skeleton
MIT License
613 stars 106 forks source link

Editing tags: no changes are visible in front end (data-grid) #438

Closed rs2487 closed 9 years ago

rs2487 commented 9 years ago

Editing a tag is workink in backend (the changed tag is saved correctly) but there is no impact on the frontend. The old value of the tag is visible!

rs2487 commented 9 years ago

Following commit in husky is responsible for the bug: https://github.com/massiveart/husky/commit/e57a58146e4af9da8a4772c79da10df607c1bbef

In Funktion renderBodyRow() Line 29489: if (!this.table.rows[record.id]) {

danrot commented 9 years ago

@michaelzangerle Can you explain this change?

michaelzangerle commented 9 years ago

@danrot Sorting of categories works like everywhere else (which should probably be discussed sometime). This means when you sort categories for example ascending then a child category could be rendered before the parent category and the nested datagrid view will break. Therefore all parent categories have to be rendered before the specific child categories and the renderBodyRow function gets called recursively.

Looks like I missed the rerendering case (why do we need that?) ...

danrot commented 9 years ago

As said in this issue in the tags, or anywhere else we are doing inline editing in datagrids. Does this check have to happen in the renderBodyRow method? Can't you just put the if around the specific call if you show a nested list?

michaelzangerle commented 9 years ago

I did not find any variable/option which would indicate that it is a nested view (just "table") but yes if we would introduce such a variable we could change the condition and handle this case differently.

rs2487 commented 9 years ago

The issue seems to be fixed, but adding a new row to the datagrid, the POST request always executed two times. So an exceptions is thrown that the entity (tag e.g.) already exists. @wachterjohannes Please reopen!

danrot commented 9 years ago

@rs2487 There is a separate issue for that: https://github.com/sulu-io/sulu/issues/1018