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

Dialogs: props not reactive #6301

Open
distantnative opened this issue Feb 25, 2024 · 0 comments
Open

Dialogs: props not reactive #6301

distantnative opened this issue Feb 25, 2024 · 0 comments
Labels
type: bug 🐛 Is a bug; fixes a bug

Comments

@distantnative
Copy link
Member

distantnative commented Feb 25, 2024

Our dialog components do not respect updates from reactive props. They are turned static.

Consider this modified example of the text dialog lab:

<template>
	<k-lab-examples>
		<k-lab-example :flex="true" label="default">
			<k-button
				icon="open"
				variant="filled"
				@click="
					$panel.dialog.open({
						component: 'k-text-dialog',
						props: {
							text: text
						}
					})
				"
			>
				Open
			</k-button>
		</k-lab-example>
	</k-lab-examples>
</template>

<script>
export default {
	data() {
		return {
			time: null
		};
	},
	computed: {
		text() {
			return "This is a text dialog: " + this.time;
		}
	},
	mounted() {
		setInterval(() => {
			this.time = new Date().toLocaleTimeString();
		}, 1000);
	}
};
</script>

The text isn't updating while the dialog is opened.

@distantnative distantnative added the type: bug 🐛 Is a bug; fixes a bug label Feb 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🐛 Is a bug; fixes a bug
Projects
None yet
Development

No branches or pull requests

1 participant