-
Notifications
You must be signed in to change notification settings - Fork 1
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: added context in item-template #886
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: dd58363 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Visit the preview URL for this PR (updated for commit dd58363): https://react-kitchen-sink-dev--pr886-885-context-in-item-4y5vbs4w.web.app (expires Thu, 21 Nov 2024 07:04:11 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 6267897ade2ba783b6db70a53a60fc3946d625e9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please write a test suite to avoid regressions
data: [1, 2, 3] | ||
name: p | ||
template: | ||
CollapsibleItem: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no Collapsible item in flutter I believe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are supporting Collapsible and Accordion as Collapsible widget in react to give backward compatibility for atlas
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes but there is no CollapsibleItem
in flutter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I know and also we are not using anywhere, I got this example reference from Anser, we are only using properties of template
from itemTemplate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this then and put the key back into itemTemplate?
const [evaluatedItems, setEvaluatedItems] = useState<CollapsibleTemplate[]>( | ||
[], | ||
); | ||
const [currentIndex, setCurrentIndex] = useState(-1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not do this! Why did you no longer make this a component? This is going to be n
renders of the entire Collapsible component instead of individual smaller renders.
Change this back to a component. Add a check in the parent Collapsible component so that it doesn't render anything until all the keys have been evaluated.
Describe your changes
Added context in item-template of collapsible widget
Screenshots [Optional]
After
Issue ticket number and link
Closes #885
Checklist before requesting a review
pnpm changeset add