datagrid
datagrid copied to clipboard
Two datagrids (different components) on same page - ItemsDetail bug
Hello, when i have two different datagrids (different components) on the same page and both has ItemDetail function there is a conflict:
Use case 1:
1) datagrid 1 - click at eye on row with primary key 10 and item detail is shown correctly and click again to close it.
2) datagrid 2 - click at eye on row with primary key 10 (different data but same key) -> on datagrid 1 is shown detail on row with key 10 = Eye buttons from key 10 from both datagrids showing detail from datagrid 1
Use case 2:
1) datagrid 2 - click at eye on row with primary key 10 and item detail is shown correctly and click again to close it.
2) datagrid 1 - click at eye on row with primary key 10 (different data but same key) -> on datagrid 2 is shown detail on row with key 10 = Eye buttons from key 10 from both datagrids showing detail from datagrid 2
If there are no same keys, everything working correctly but when there are same keys in both datagrids, depends which one has been clicked first.
@paveljanda This is a bug in javascript. Results of itemDetail requests are cached (hidden), but the jQuery selector is global and not restricted to current datagrid only - Therefore cached version from first datagrid is found and shown.
Any idea how to fix it?
You need to modify jquery selectors to operate only on current datagrid - currently it searches globally.