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

Editor readonly mode not working #172

Open
HDShabe opened this issue Jun 12, 2023 · 7 comments
Open

Editor readonly mode not working #172

HDShabe opened this issue Jun 12, 2023 · 7 comments

Comments

@HDShabe
Copy link

HDShabe commented Jun 12, 2023

  • BalmUI version: 10.21.2

Hi @elf-mouse ,

I've got an editor that i'm using but it doesn't seem to be going into readonly mode properly.


     <ui-editor v-model="viewModel.description"
                               placeholder="Description"
                               :readonly="fieldsLockedInEditMode"></ui-editor>
  computed: {
            fieldsLockedInEditMode() {
                return !this.editMode;
            }
        },

I can see in Vue dev tools it's setting the property fine, but UI still allows for edit.

image
image

elf-mouse added a commit that referenced this issue Jun 15, 2023
@elf-mouse
Copy link
Member

This bug has been fixed in the new version. Thanks.

@HDShabe
Copy link
Author

HDShabe commented Jun 15, 2023

Hi @elf-mouse
I've updated to 10.22.0 but i'm still seeing the same behaviour, looking at your commit I don't think there's anything that I needed to change on my end?

elf-mouse added a commit that referenced this issue Jun 16, 2023
@elf-mouse
Copy link
Member

Hi @HDShabe , The readonly watch bug has been fixed. You can reinstall and try it again.

Thank you very much~

@HDShabe
Copy link
Author

HDShabe commented Jun 19, 2023

Looks much better, thanks again!

@HDShabe HDShabe closed this as completed Jun 19, 2023
@HDShabe
Copy link
Author

HDShabe commented Jun 20, 2023

Hi @elf-mouse

I've spotted something else. When I have the editor not rendered in a v-if and then change the state to render it, I'm getting a case where both the bound data and the placeholder are displaying at the same time.

image

image

if I toggle readonly off then the placeholder disappears, from which point it seems to work as expected both in readonly and normal mode.

Cheers

@HDShabe HDShabe reopened this Jun 20, 2023
@HDShabe
Copy link
Author

HDShabe commented Jun 21, 2023

Looking into this a little more, it only seems to happen when I have my ui-editor bound to a nested viewmodel on the data of the component, though i'm now seeing errors like this one after removing the viewmodel and binding ui-editor directly to the data object:

image

I haven't got any conditional rendering other than the element sliding into the page with a CSS keyframe animation

@elf-mouse
Copy link
Member

Hi @HDShabe , the placeholder bug has been fixed in new version. You can try it again. Thank you very much~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants