← All changes
|
resources/js/blocks/components/ClassificationMultiSelect.tsx
+10
-9
3.0.4
→
3.0.16
View file →
| @@ -127,9 +127,12 @@ | ||
| 127 | 127 | <fieldset |
| 128 | 128 | className="yatra-block-taxonomy-field" |
| 129 | 129 | style={{ margin: "0 0 16px", border: "none", padding: 0 }} |
| 130 | 130 | > |
| 131 | - <legend className="components-base-control__label" style={{ padding: 0 }}> | |
| 131 | + <legend | |
| 132 | + className="components-base-control__label" | |
| 133 | + style={{ padding: 0 }} | |
| 134 | + > | |
| 132 | 135 | {label} |
| 133 | 136 | </legend> |
| 134 | 137 | <Spinner /> |
| 135 | 138 | </fieldset> |
| @@ -195,9 +198,12 @@ | ||
| 195 | 198 | onChange={(s) => setSearch(s)} |
| 196 | 199 | __nextHasNoMarginBottom |
| 197 | 200 | /> |
| 198 | 201 | {value.length > 0 && ( |
| 199 | - <p className="components-base-control__help" style={{ marginTop: 4 }}> | |
| 202 | + <p | |
| 203 | + className="components-base-control__help" | |
| 204 | + style={{ marginTop: 4 }} | |
| 205 | + > | |
| 200 | 206 | {sprintf( |
| 201 | 207 | /* translators: %d = number of selected taxonomy items */ |
| 202 | 208 | __("%d selected", "yatra"), |
| 203 | 209 | value.length, |
| @@ -217,18 +223,13 @@ | ||
| 217 | 223 | ) : ( |
| 218 | 224 | filteredItems.map((item) => { |
| 219 | 225 | const cid = Number(item.id); |
| 220 | 226 | return ( |
| 221 | - <div | |
| 222 | - key={cid} | |
| 223 | - style={{ padding: "2px 8px" }} | |
| 224 | - > | |
| 227 | + <div key={cid} style={{ padding: "2px 8px" }}> | |
| 225 | 228 | <CheckboxControl |
| 226 | 229 | label={`${item.name} (${cid})`} |
| 227 | 230 | checked={selectedSet.has(cid)} |
| 228 | - onChange={(checked) => | |
| 229 | - toggleId(cid, checked === true) | |
| 230 | - } | |
| 231 | + onChange={(checked) => toggleId(cid, checked === true)} | |
| 231 | 232 | __nextHasNoMarginBottom |
| 232 | 233 | /> |
| 233 | 234 | </div> |
| 234 | 235 | ); |