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(ktableview): row-expanded prop and event [KHCP-14243] #2527

Merged
merged 6 commits into from
Nov 26, 2024

Conversation

portikM
Copy link
Member

@portikM portikM commented Nov 26, 2024

Summary

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

Changes:

  • add row-expanded prop to provide an ability to render some rows expanded by default initially
  • rename row-expand event to update:row-expanded and change event payload
    • instead of emitting event only when a row is expanded, event is emitted when a row is expanded OR collapsed
    • event payload changed from row: Record<string, any> object to { row: Record<string, any>, expanded: boolean }

@portikM portikM self-assigned this Nov 26, 2024
Copy link

netlify bot commented Nov 26, 2024

Deploy Preview for kongponents-sandbox ready!

Name Link
🔨 Latest commit a4732d7
🔍 Latest deploy log https://app.netlify.com/sites/kongponents-sandbox/deploys/674618d5d8fde1000874eac6
😎 Deploy Preview https://deploy-preview-2527--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.

Copy link

netlify bot commented Nov 26, 2024

Deploy Preview for kongponents ready!

Name Link
🔨 Latest commit a4732d7
🔍 Latest deploy log https://app.netlify.com/sites/kongponents/deploys/674618d5c5d7f80008146332
😎 Deploy Preview https://deploy-preview-2527--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.

@portikM portikM marked this pull request as ready for review November 26, 2024 18:55
@portikM portikM enabled auto-merge (squash) November 26, 2024 19:02
@@ -754,6 +754,42 @@ Function for making a row expandable. The function receives row value object as
</KTableView>
```

### rowExpanded

Use this prop to specify initial expanded / collapsed state for each data row. The function receives row value object as an argument and should return a boolean value. Default value is `() => false`. When returned value is `true`, a row is rendered expanded.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Use this prop to specify initial expanded / collapsed state for each data row. The function receives row value object as an argument and should return a boolean value. Default value is `() => false`. When returned value is `true`, a row is rendered expanded.
Use this prop to specifythe initial expanded / collapsed state for each data row. The function receives the row value object as an argument and should return a boolean value. Default value is `() => false`. When returned value is `true`, a row is rendered expanded.

Copy link
Collaborator

@kaiarrowood kaiarrowood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One nit, but otherwise functional and code looks great 🚀

@portikM portikM merged commit eb92309 into main Nov 26, 2024
11 checks passed
@portikM portikM deleted the fix/khcp-14243-ktableview-expandable-row-improvements branch November 26, 2024 21:10
kongponents-bot pushed a commit that referenced this pull request Nov 26, 2024
## [9.14.17](v9.14.16...v9.14.17) (2024-11-26)

### Bug Fixes

* **kalert:** slotted links default styling [KHCP-14152] ([#2528](#2528)) ([631a287](631a287))
* **ktableview:** row-expanded prop and event [KHCP-14243] ([#2527](#2527)) ([eb92309](eb92309))
@kongponents-bot
Copy link
Collaborator

🎉 This PR is included in version 9.14.17 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

3 participants