@@ -146,13 +146,19 @@ const f = {
146146 * Note: using this method will escape all special characters in the output of the property
147147 * @param {string } $ - the element
148148 * @param {string } name - the name of the field
149+ * @param {string } inlineName - the name of the field for repeatable inline editables or false to disable inline edit
150+ * @param {string } inlineChildName - the name of the variable for inline repeatables
149151 */
150152 mapField ( $ , name , inlineName , inlineChildName ) {
151153 $ . html ( `{{${ name } }}` )
152- if ( ! inlineName ) {
154+ if ( inlineName === undefined ) {
153155 $ . attr ( 'data-per-inline' , name )
154156 } else {
155- $ . attr ( 'v-bind:data-per-inline' , '`' + inlineName + '.${i}.' + inlineChildName + '`' )
157+ if ( inlineName === false ) {
158+ // no need to do anything, we do not want this field to be inline editable
159+ } else {
160+ $ . attr ( 'v-bind:data-per-inline' , '`' + inlineName + '.${i}.' + inlineChildName + '`' )
161+ }
156162 }
157163 } ,
158164
@@ -161,13 +167,19 @@ const f = {
161167 * In the vuejs implementation this maps to an attribute v-html="model.<name>"
162168 * @param {string } $ - the element
163169 * @param {string } name - the name of the field
170+ * @param {string } inlineName - the name of the field for repeatable inline editables or false to disable inline edit
171+ * @param {string } inlineChildName - the name of the variable for inline repeatables
164172 */
165173 mapRichField ( $ , name , inlineName , inlineChildName ) {
166174 $ . attr ( 'v-html' , name )
167- if ( ! inlineName ) {
175+ if ( inlineName === undefined ) {
168176 $ . attr ( 'v-bind:data-per-inline' , '`' + name + '`' )
169177 } else {
170- $ . attr ( 'v-bind:data-per-inline' , '`' + inlineName + '.${i}.' + inlineChildName + '`' )
178+ if ( inlineName === false ) {
179+ // no need to do anything, we do not want this field to be inline editable
180+ } else {
181+ $ . attr ( 'v-bind:data-per-inline' , '`' + inlineName + '.${i}.' + inlineChildName + '`' )
182+ }
171183 }
172184 $ . html ( `` )
173185 } ,
0 commit comments