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

cosmoz-omnitable-column-autocomplete - enabling after render does not show suggestions #291

Open
dotpointer opened this issue Jun 11, 2019 · 0 comments
Labels

Comments

@dotpointer
Copy link
Contributor

Found a problem where (non-OTS) header suggestions are not displayed in cosmoz-omnitable-column-autocomplete if disabled$ is changed from true to false after the table has been rendered.

No suggestions are displayed when header is clicked:

<cosmoz-omnitable-column-autocomplete 
  disabled$="[[ !containsAdjustmentOrder ]]"
  name="originalOrder"
  text-property="label"
  title="[[ _('Original order', t) ]]"
  value-path="additionalOrderNumber0"
  value-property="id">
</cosmoz-omnitable-column-autocomplete>

Workaround with template, shows suggestions when clicked:

<template is="dom-if" if="[[ containsAdjustmentOrder ]]">
  <cosmoz-omnitable-column-autocomplete
    name="originalOrder"
    text-property="label"
    title="[[ _('Original order', t) ]]"
    value-path="additionalOrderNumber0"
    value-property="id">
  </cosmoz-omnitable-column-autocomplete>
</template>

containsAdjustmentOrder has in this example a computed function that is somewhat slow to respond, so at first it is set to false, then it switches to true. Setting containsAdjustmentOrder to only false makes the column disappear, setting it to true makes it show suggestions.

@dotpointer dotpointer added the bug label Jun 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant