Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fixes to datalist id #542

Merged
merged 3 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "writer"
version = "0.7.1"
version = "0.7.2"
description = "An open-source, Python framework for building feature-rich apps that are fully integrated with the Writer platform."
authors = ["Writer, Inc."]
readme = "README.md"
Expand Down
6 changes: 5 additions & 1 deletion src/ui/src/builder/BuilderFieldsText.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
>
<BuilderTemplateInput
class="content"
:input-id="inputId"
:value="component.content[fieldKey]"
:placeholder="templateField?.default"
:options="options"
Expand All @@ -19,6 +20,7 @@
multiline
variant="text"
class="content"
:input-id="inputId"
:value="component.content[fieldKey]"
:placeholder="templateField?.default"
@input="handleInput"
Expand Down Expand Up @@ -50,14 +52,16 @@ const templateField = computed(() => {
return definition.fields[fieldKey.value];
});

const inputId = computed(() => `${props.componentId}-${props.fieldKey}`);

const options = computed(() => {
const field = templateField.value;
if (field.options) {
return typeof field.options === "function"
? field.options(wf, componentId.value)
: field.options;
}
return [];
return {};
});

const handleInput = (ev: Event) => {
Expand Down
9 changes: 8 additions & 1 deletion src/ui/src/core_components/content/CoreAnnotatedText.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@
</template>

<script lang="ts">
import { cssClasses, primaryTextColor } from "../../renderer/sharedStyleFields";
import {
buttonColor,
buttonTextColor,
cssClasses,
primaryTextColor,
} from "../../renderer/sharedStyleFields";
import BaseControlBar from "../base/BaseControlBar.vue";
export default {
writer: {
Expand Down Expand Up @@ -76,6 +81,8 @@ export default {
default: "no",
category: FieldCategory.Style,
},
buttonColor,
buttonTextColor,
primaryTextColor,
cssClasses,
},
Expand Down
Loading