Comments (20)
@Trysystems I believe it is set up this way because the data table was originally built for the Builder plugin (I believe?) and that's the format it used. Since it's been like this for years, it may be difficult to make any changes to the naming without breaking implementations of this data type already out there, but we'll look into it further.
from winter.
@Trysystems could you link the PR here?
from winter.
from winter.
Thank you. This fix shouldn't break anything because "Report[data[1][row]]" wrong structure of field name and it can't work at all, because table.js use this name to create post data, and with wrong name data loses.
from winter.
Some backtracking information (may be useful for someone to make PR or test things) - mentioned code part which may contain problem for this issue was introduced in 970d562 as a fix for octobercms/october#4063
from winter.
In fields.yaml
:
fields:
content:
label: Content
type: datatable
columns:
field1:
title: Code
field2:
title: Title
field3:
title: Title
^ I made this just for testing purposes and works fine for me. I understand that this is not the format issue author is using but may I ask @Trysystems why you use so specific keys like data[1][row]
and data[2][row]
? Can't you reduce that to similar example I mentioned?
from winter.
fields:
content[table]:
label: Content
type: datatable
columns:
field1:
title: Code
field2:
title: Title
field3:
title: Title
This will give you data-field-name="Model[content[table]]" attribute now. And js script cant push to server correct data, so you'll receive model[content] empty array.
from winter.
@Trysystems True but why can't you simply use content
or table
as the field name of datable field so you could avoid using nested name in the first place?
In my opinion field name is a field name, that's the reason why it's treated like single value. I also couldn't find any references to your mentioned cases for any other form field in https://wintercms.com/docs/backend/forms
Also make sure that you have set your datatable field as jsonable field in your model (property protected $jsonable = [];
) because I assume that you would want to store all datatable data into one single text field of database row.
from winter.
@Trysystems we have examples of the data table working in the Test plugin without these changes. Are you able to demonstrate in a PR to the Test plugin an implementation that does result in data loss?
from winter.
This issue will be closed and archived in 3 days, as there has been no activity in the last 60 days.
If this issue is still relevant or you would like to see it actioned, please respond and we will re-open this issue.
If this issue is critical to your business, consider joining the Premium Support Program where a Service Level Agreement is offered.
from winter.
Still actual. The example was provided as PR to Test plugin.
from winter.
This issue will be closed and archived in 3 days, as there has been no activity in the last 60 days.
If this issue is still relevant or you would like to see it actioned, please respond and we will re-open this issue.
If this issue is critical to your business, consider joining the Premium Support Program where a Service Level Agreement is offered.
from winter.
This issue will be closed and archived in 3 days, as there has been no activity in the last 60 days.
If this issue is still relevant or you would like to see it actioned, please respond and we will re-open this issue.
If this issue is critical to your business, consider joining the Premium Support Program where a Service Level Agreement is offered.
from winter.
This issue will be closed and archived in 3 days, as there has been no activity in the last 60 days.
If this issue is still relevant or you would like to see it actioned, please respond and we will re-open this issue.
If this issue is critical to your business, consider joining the Premium Support Program where a Service Level Agreement is offered.
from winter.
This issue will be closed and archived in 3 days, as there has been no activity in the last 60 days.
If this issue is still relevant or you would like to see it actioned, please respond and we will re-open this issue.
If this issue is critical to your business, consider joining the Premium Support Program where a Service Level Agreement is offered.
from winter.
This issue will be closed and archived in 3 days, as there has been no activity in the last 60 days.
If this issue is still relevant or you would like to see it actioned, please respond and we will re-open this issue.
If this issue is critical to your business, consider joining the Premium Support Program where a Service Level Agreement is offered.
from winter.
This issue will be closed and archived in 3 days, as there has been no activity in this issue for the last 6 months.
If this issue is still relevant or you would like to see it actioned, please respond within 3 days.
If this issue is critical for your business, please reach out to us at [email protected].
from winter.
This issue will be closed and archived in 3 days, as there has been no activity in this issue for the last 6 months.
If this issue is still relevant or you would like to see it actioned, please respond within 3 days.
If this issue is critical for your business, please reach out to us at [email protected].
from winter.
This issue will be closed and archived in 3 days, as there has been no activity in this issue for the last 6 months.
If this issue is still relevant or you would like to see it actioned, please respond within 3 days.
If this issue is critical for your business, please reach out to us at [email protected].
from winter.
This issue will be closed and archived in 3 days, as there has been no activity in this issue for the last 6 months.
If this issue is still relevant or you would like to see it actioned, please respond within 3 days.
If this issue is critical for your business, please reach out to us at [email protected].
from winter.
Related Issues (20)
- Error with the database when installing version 1.2.4 HOT 9
- Datepicker (datetime) no time at preview mode
- Error when trying to install plugin in a fresh install HOT 2
- Missing Storage facade HOT 1
- Issues with PHP 8.3 HOT 1
- "Call to undefined method Event::listen()" while installation HOT 4
- Error when click "Install plugins" and "install themes" button in wintercms's admin page HOT 2
- Count parameter not working with Has-Many-Through relation HOT 5
- Fontawesome 6.1.1 to 6.5.1 for remove Font console error HOT 2
- Updating a plugin via command-line error. HOT 2
- Adding event context to EventLog service provider HOT 2
- Broken default email layout after upgrading to Twig 3.9.1 HOT 2
- Translate parameters - urlFromPattern bug HOT 1
- Interoperability issue with 500 response code caused by ApplicationException HOT 3
- Winter\Storm\Database\Relations\BelongsToMany::shouldSelect(): Argument #1 ($columns) must be of type array, int given HOT 2
- Image not upload HOT 6
- imageWidth/imageHeight filters not available on cold cache
- HTTP Testing of Plugin not possible HOT 4
- error 500 after update from 1.2.5 to 1.2.6 HOT 6
- Correction for undefined variable $record in modules\system\behaviors\SettingsModel.php line 140 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from winter.