ghiscoding / Angular-Slickgrid

Angular-Slickgrid is a wrapper of the lightning fast & customizable SlickGrid datagrid, it also includes multiple Styling Themes
https://ghiscoding.github.io/Angular-Slickgrid
MIT License
392 stars 117 forks source link

Row Details useRowClick false does not work #440

Closed meta-akshita-agrawal closed 4 years ago

meta-akshita-agrawal commented 4 years ago

I'm submitting a Bug report

Your Environment

Software Version(s)
Angular 9.0
Angular-Slickgrid 2.17
TypeScript 3.7

Describe the Bug

Hi Author,

Thanks for making such a powerful library :). I am reporting this issue for row detail functionality. useRowClick : false does not work.

According to the docs I read, It says:

// false by default, clicking anywhere on the row will open the detail view // when set to false, only the "+" icon would open the row detail // if you use editor or cell navigation you would want this flag set to false (default)

So this is the actual scenario I have in my project I have rows with an editable column which is why I can't use useRowClick : true

Also, it says by default this property is false so I simply just commented that property and found that it behaves just as same only you don't have a cursor on the whole row. So I added the property useRowClick: false and after that, the row detail stopped rendering.

Then I downloaded your example from GitHub and used the same property as false and found that it does not work in your code either. Let me know if I am doing something wrong.

Steps to Reproduce

use useRowClick property as false in the GitHub example https://github.com/ghiscoding/Angular-Slickgrid/blob/master/src/app/examples/grid-rowdetail.component.ts

Expected Behavior

Row details should be opened on + icon

Current Behavior

It does not render any row detail

Possible Solution

Code Sample

ghiscoding commented 4 years ago

From the first findings, the useRowClick default is false rather than true and the demo is not working with useRowClick: false because there is a small issue when using dataViewIdProperty which I fixed by creating this PR in the core lib to fix it. Last but not least, if you are using id in your object then it will work with useRowClick: false but it won't work properly when using dataViewIdProperty until the PR is merged and a new release of the core lib is out.

EDIT

Took a quick look at the defaults and the reason you found that the useRowClick seems true by default is because of what I've actually defined in the Angular-Slickgrid grid options here. So I should remove the comment you mentioned, it's not valid as you found out.

meta-akshita-agrawal commented 4 years ago

Thanks, @ghiscoding. It solved my issue :) So basically I just used the unique id of a row as "id" earlier I used a custom one. Still waiting for you PR.

ghiscoding commented 4 years ago

Don't wait for it, it will take a couple more weeks for me to release a new version since I have few other things in the queue that I want to finish before releasing anything, also the PR is in the core lib (not my lib) which also has to have a new version.

ghiscoding commented 4 years ago

Fixed in PR #449, now using latest SlickGrid (core) version, I've also switched back useRowClick to false in the global defaults, so the comments remain valid.

Note however that I won't release a new version until couple more weeks, I want to finish some other features before I'm ready for a new version.

ghiscoding commented 4 years ago

This is now available in latest version 2.18.x.

Please upvote ⭐ if you haven't already. Cheers