Closed Jenselme closed 8 years ago
Hi Julien,
Thanks for your proposal, I need to study it because the compute of row and column size can be expensive with lots of data.
I think, the better way is to execute this compute only if the developer wants it. For example, you can use editDirectives parameter on column to inject your own custom directives to the row and column compute.
{
"editDirectives":" ng-compute-rows=true ng-compute-cols=true"
}
What do you think ?
Best regards, Guillaume
the compute of row and column size can be expensive with lots of data.
True
For example, you can use editDirectives parameter on column to inject your own custom directives to the row and column compute.
Seems like a good idea. I'll try to implement that soon.
I gave it a look today and I am not sure that I understand what you mean by:
For example, you can use editDirectives parameter on column to inject your own custom directives to the row and column compute. { "editDirectives":" ng-compute-rows=true ng-compute-cols=true" }
When I first read it, it seemed to me that the directives ng-compute-rows
and ng-compute-cols
already existed. However, I wasn't able to find them on the internet. Did you mean instead that I should create them in UDT?
Julien,
Sorry for the trouble. These directives does not exists, that's just an example of directive names. Yes, you need to create the directives then you can add it in UDT if you want or just keep it in your project.
Best regards, Guillaume
Would something like that: https://github.com/institut-de-genomique/Ultimate-DataTable/commit/0740ce63d372f4f7cd196a8991ce186df335f35a be OK for you?
You can use it like that: editDirectives: ' udt-textarea-resize udt-textarea-text="value.data[col.property]" ',
Hi Julien,
Good work. You can improve your directive with the ngModelCtrl property. You can find an example on udt-change directive and see the doc : ngModelController.
With this feature you don't need to have the attribute : udt-textarea-text.
Regards, Guillaume
Thanks for the tip! See #29 for the new PR.
Base the number of rows and columns on the content of the area