@elementor/editor-controls 4.1.0-811 → 4.1.0-813
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.mjs
CHANGED
|
@@ -6065,6 +6065,7 @@ var PositionControl = () => {
|
|
|
6065
6065
|
const positionContext = useBoundProp(positionPropTypeUtil);
|
|
6066
6066
|
const stringPropContext = useBoundProp(stringPropTypeUtil15);
|
|
6067
6067
|
const isCustom = !!positionContext.value;
|
|
6068
|
+
const placeholder = positionContext.placeholder ? "custom" : stringPropContext.placeholder ?? null;
|
|
6068
6069
|
const handlePositionChange = (event) => {
|
|
6069
6070
|
const value = event.target.value || null;
|
|
6070
6071
|
if (value === "custom") {
|
|
@@ -6077,9 +6078,11 @@ var PositionControl = () => {
|
|
|
6077
6078
|
Select5,
|
|
6078
6079
|
{
|
|
6079
6080
|
size: "tiny",
|
|
6081
|
+
displayEmpty: true,
|
|
6080
6082
|
disabled: stringPropContext.disabled,
|
|
6081
6083
|
value: (positionContext.value ? "custom" : stringPropContext.value) ?? "",
|
|
6082
6084
|
onChange: handlePositionChange,
|
|
6085
|
+
renderValue: (selectedValue) => getSelectRenderValue(positionOptions, placeholder, selectedValue),
|
|
6083
6086
|
fullWidth: true
|
|
6084
6087
|
},
|
|
6085
6088
|
positionOptions.map(({ label, value }) => /* @__PURE__ */ React89.createElement(MenuListItem7, { key: value, value: value ?? "" }, label))
|