editable DataTable with PrimeElements not working

jQuery UI Widgets
Post Reply
squeegeeman
Posts: 2
Joined: 06 Sep 2016, 12:11

06 Sep 2016, 12:17

Hi,

I'm trying to use a datatable with Primeelements. All is fine except that I'm not able to make the columns editable.
Without primeelements it works fine.

Here's my code:

Code: Select all

		<p-datatable datasource="/get_data" editmode="cell">
			<p-column field="vin" headertext="Vin" editor='input'></p-column>
			<p-column field="year" headertext="Year" editor='input'></p-column>
			<p-column field="brand" headertext="Brand" editor='input'></p-column>
			<p-column field="color" headertext="Color" editor='input'></p-column>
		</p-datatable>
So pretty straightforward, but the cells are not editable. Am I doing something wrong?
Thanks

squeegeeman
Posts: 2
Joined: 06 Sep 2016, 12:11

07 Sep 2016, 13:35

Actually I found the problem. It is a bug in version 4.1.15 in the primeelements.js code at line 599:

Code: Select all

599   col.editor = columnElement.attr('editor') !== undefined;
this should be changed to:

Code: Select all

599   col.editor = columnElement.attr('editor');
Then it works. :)

Please provide an updated min version of the file. Thanks

Post Reply

Return to “PrimeUI”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 4 guests