@@ -16,6 +16,7 @@ import ServerSideRender from '@wordpress/server-side-render';
1616import { useBlockProps , InspectorControls } from '@wordpress/block-editor' ;
1717
1818import {
19+ Disabled ,
1920 TextControl ,
2021 TextareaControl ,
2122 ToggleControl ,
@@ -58,7 +59,7 @@ export default function Edit({ attributes, setAttributes }) {
5859 columns,
5960 other_attributes,
6061 } = attributes ;
61- console . log ( attributes ) ;
62+
6263 const blockProps = useBlockProps ( ) ;
6364 const onChangeCategory = ( newCategory ) => {
6465 setAttributes ( {
@@ -113,7 +114,10 @@ export default function Edit({ attributes, setAttributes }) {
113114 < PanelRow >
114115 < fieldset >
115116 < TextControl
116- label = { __ ( 'Max articles per section' , 'knowledgebase' ) }
117+ label = { __ (
118+ 'Max articles per section' ,
119+ 'knowledgebase'
120+ ) }
117121 value = { limit }
118122 onChange = { onChangeLimit }
119123 help = { __ (
@@ -126,11 +130,20 @@ export default function Edit({ attributes, setAttributes }) {
126130 < PanelRow >
127131 < fieldset >
128132 < ToggleControl
129- label = { __ ( 'Show article count' , 'knowledgebase' ) }
133+ label = { __ (
134+ 'Show article count' ,
135+ 'knowledgebase'
136+ ) }
130137 help = {
131138 showArticleCount
132- ? __ ( 'Article count displayed' , 'knowledgebase' )
133- : __ ( 'No article count displayed' , 'knowledgebase' )
139+ ? __ (
140+ 'Article count displayed' ,
141+ 'knowledgebase'
142+ )
143+ : __ (
144+ 'No article count displayed' ,
145+ 'knowledgebase'
146+ )
134147 }
135148 checked = { showArticleCount }
136149 onChange = { toggleShowArticleCount }
@@ -143,7 +156,10 @@ export default function Edit({ attributes, setAttributes }) {
143156 label = { __ ( 'Show excerpt' , 'knowledgebase' ) }
144157 help = {
145158 showExcerpt
146- ? __ ( 'Excerpt displayed' , 'knowledgebase' )
159+ ? __ (
160+ 'Excerpt displayed' ,
161+ 'knowledgebase'
162+ )
147163 : __ ( 'No excerpt' , 'knowledgebase' )
148164 }
149165 checked = { showExcerpt }
@@ -154,11 +170,20 @@ export default function Edit({ attributes, setAttributes }) {
154170 < PanelRow >
155171 < fieldset >
156172 < ToggleControl
157- label = { __ ( 'Show clickable section' , 'knowledgebase' ) }
173+ label = { __ (
174+ 'Show clickable section' ,
175+ 'knowledgebase'
176+ ) }
158177 help = {
159178 hasClickableSection
160- ? __ ( 'Section headers are linked' , 'knowledgebase' )
161- : __ ( 'Section headers not linked' , 'knowledgebase' )
179+ ? __ (
180+ 'Section headers are linked' ,
181+ 'knowledgebase'
182+ )
183+ : __ (
184+ 'Section headers not linked' ,
185+ 'knowledgebase'
186+ )
162187 }
163188 checked = { hasClickableSection }
164189 onChange = { toggleClickableSection }
@@ -168,11 +193,20 @@ export default function Edit({ attributes, setAttributes }) {
168193 < PanelRow >
169194 < fieldset >
170195 < ToggleControl
171- label = { __ ( 'Show empty sections' , 'knowledgebase' ) }
196+ label = { __ (
197+ 'Show empty sections' ,
198+ 'knowledgebase'
199+ ) }
172200 help = {
173201 showEmptySections
174- ? __ ( 'Empty sections displayed' , 'knowledgebase' )
175- : __ ( 'Empty sections hidden' , 'knowledgebase' )
202+ ? __ (
203+ 'Empty sections displayed' ,
204+ 'knowledgebase'
205+ )
206+ : __ (
207+ 'Empty sections hidden' ,
208+ 'knowledgebase'
209+ )
176210 }
177211 checked = { showEmptySections }
178212 onChange = { toggleShowEmptySections }
@@ -209,10 +243,12 @@ export default function Edit({ attributes, setAttributes }) {
209243 </ InspectorControls >
210244
211245 < div { ...blockProps } >
212- < ServerSideRender
213- block = "knowledgebase/knowledgebase"
214- attributes = { attributes }
215- />
246+ < Disabled >
247+ < ServerSideRender
248+ block = "knowledgebase/knowledgebase"
249+ attributes = { attributes }
250+ />
251+ </ Disabled >
216252 </ div >
217253 </ >
218254 ) ;
0 commit comments