kongponents icon indicating copy to clipboard operation
kongponents copied to clipboard

fix(ktable): emit preferences only in success state [KHCP-11890]

Open portikM opened this issue 1 year ago • 3 comments

Summary

Addresses: https://konghq.atlassian.net/browse/KHCP-11890

PR Checklist

  • [ ] Conventional Commits all commits follow the conventional commit standards outlined in the main README.
  • [ ] Tests coverage: test coverage was added for new features and bug fixes
  • [ ] Docs: includes a technically accurate README

portikM avatar May 16 '24 16:05 portikM

Deploy Preview for kongponents-sandbox ready!

Name Link
Latest commit c196ae1682a610902210c6e1d691e979ea17b206
Latest deploy log https://app.netlify.com/sites/kongponents-sandbox/deploys/664d05f824edba0007db735b
Deploy Preview https://deploy-preview-2191--kongponents-sandbox.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar May 16 '24 17:05 netlify[bot]

Deploy Preview for kongponents ready!

Name Link
Latest commit c196ae1682a610902210c6e1d691e979ea17b206
Latest deploy log https://app.netlify.com/sites/kongponents/deploys/664d05f8521fd70007528e7a
Deploy Preview https://deploy-preview-2191--kongponents.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar May 16 '24 17:05 netlify[bot]

I think this approach makes sense if we can get it to work. Until the table data has finished loading there is no need to load the table preferences IMO. I would ask that we update the logic for the menu trigger button to handle the other table states though (if we aren't already).

const tableState = computed((): TableState => isTableLoading.value ? 'loading' : fetcherError.value ? 'error' : 'success')

If tableState is loading lets disable the menu button; if it's error lets hide the button.

That's how it works already (column visibility and pagination controls are hidden when table is on loading or error states)

portikM avatar May 21 '24 20:05 portikM

:tada: This PR is included in version 9.0.0-alpha.158 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

kongponents-bot avatar May 21 '24 21:05 kongponents-bot