Comments (3)
@beliolfa It seems like you are still referencing your readOnly
attribute inside your vue components, which itself is looking at this.field.readOnly
. Meanwhile Nova has its on computed property for that called isReadonly
, in which readonly
(see the lowercase o
) but also this.field.extraAttributes.readonly
are looked at, the latter is the property which is set by Nova-fields.
This results in the behaviour that your fields are not displaying as readonly, but behave that way (value does not get saved).
Additionally, the JSON field will save values even when a field inside it has been marked as readonly, as a workaround for our project I extended your JSON-class and changed fillAttributeFromRequest
, so that the fields that are readonly get rejected before filling (via ->reject->isReadOnly($request)
).
from nova-fields.
Hey @dtannen sorry for the delay I took a little vacation.
Since this PR https://github.com/64robots/nova-fields/pull/167/files we are not redeclaring readOnly
anymore so if you use the modifier as described in Nova Docs should work. Can you try and let me know if it works? If not, please, provide reproduction steps and I will try to fix it.
Thanks!
from nova-fields.
Hey @NeroAzure thank you for your detailed solution. It looks like you fixed the issue in your projects. Do you mind opening a PR so I can take a look? If you are busy I will fix it as soon as I can.
from nova-fields.
Related Issues (20)
- fieldClasses, inputClasses and wrapperClasses are not being added to the Field HOT 1
- quickCreate with parameters to populate values not working HOT 1
- quickCreate modal breaks if there are any fields forEach is not a function HOT 4
- Composer install failing?
- Row Sorting HOT 1
- JSON field stores empty data if last child field is empty HOT 4
- Help Texts are not visible any more in JSON field HOT 5
- Row field is not hydrated in form view (undefined error thrown in console) HOT 3
- Panel title on JSON field grouping HOT 1
- JSON in JSON field does not work HOT 1
- production files are 640 kb
- Translation in this package
- Datepicker not open
- Support for alwaysShow() on row field type
- Documentation website is down
- Abandoned?
- Project status
- Nova 4 HOT 12
- TypeError: Cannot read properties of undefined (reading '_c') in nova-fields
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 nova-fields.