ekondur / DatatableJS

Jquery datatable with entity framework using MVC html helper
MIT License
36 stars 15 forks source link

Removing data null check in Template #95

Closed ekondur closed 1 year ago

ekondur commented 1 year ago

We should remove the data null check here,

{(string.IsNullOrEmpty(a.Render) ? string.Empty : $"'render': function(data, type, row, meta) {{ if (data == null) {{ return ''; }} else {{ return {a.Render}; }} }}")} to : {(string.IsNullOrEmpty(a.Render) ? string.Empty : $"'render': function(data, type, row, meta) {{ return {a.Render}; }}")}

Users can add a null check manually when defining .Template

.Template("(data === 'Y') ? 'Yes' : (data === null) ? 'None' : 'No'");

These files might be affected:

ekondur commented 1 year ago

Hi @madcoda9000 ; You have found this issue, do you want to make it?

madcoda9000 commented 1 year ago

Sure, I'll do a pull request for that issue.

madcoda9000 commented 1 year ago

Hi @ekondur

I've created the pull request

madcoda9000 commented 1 year ago

sorry, i've to made a new pull request. I am quite confused. When i create a new pull request, github takes ALL commits into that pull request. How can i specify which commit should be taken for the pull request?

Sorry to bother you with such questions :-)

ekondur commented 1 year ago

Hi @madcoda9000, Everything seems fine for you PR :) There is just one commit in there. Thank you for your contribution.

ekondur commented 1 year ago

It is released with v3.3.2