@elementor/editor-controls 4.1.0-810 → 4.1.0-812
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +15 -15
- package/src/controls/position-control.tsx +7 -0
- package/src/controls/select-control.tsx +1 -1
package/dist/index.js
CHANGED
|
@@ -6092,6 +6092,7 @@ var PositionControl = () => {
|
|
|
6092
6092
|
const positionContext = useBoundProp(import_editor_props41.positionPropTypeUtil);
|
|
6093
6093
|
const stringPropContext = useBoundProp(import_editor_props41.stringPropTypeUtil);
|
|
6094
6094
|
const isCustom = !!positionContext.value;
|
|
6095
|
+
const placeholder = positionContext.placeholder ? "custom" : stringPropContext.placeholder ?? null;
|
|
6095
6096
|
const handlePositionChange = (event) => {
|
|
6096
6097
|
const value = event.target.value || null;
|
|
6097
6098
|
if (value === "custom") {
|
|
@@ -6104,9 +6105,11 @@ var PositionControl = () => {
|
|
|
6104
6105
|
import_ui73.Select,
|
|
6105
6106
|
{
|
|
6106
6107
|
size: "tiny",
|
|
6108
|
+
displayEmpty: true,
|
|
6107
6109
|
disabled: stringPropContext.disabled,
|
|
6108
6110
|
value: (positionContext.value ? "custom" : stringPropContext.value) ?? "",
|
|
6109
6111
|
onChange: handlePositionChange,
|
|
6112
|
+
renderValue: (selectedValue) => getSelectRenderValue(positionOptions, placeholder, selectedValue),
|
|
6110
6113
|
fullWidth: true
|
|
6111
6114
|
},
|
|
6112
6115
|
positionOptions.map(({ label, value }) => /* @__PURE__ */ React89.createElement(import_editor_ui12.MenuListItem, { key: value, value: value ?? "" }, label))
|