-
Notifications
You must be signed in to change notification settings - Fork 594
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
Array modal's fields now keyboard accessible #4693
base: main
Are you sure you want to change the base?
Conversation
const modified = typeof this.isModified === 'function' ? this.isModified() : this.isModified; | ||
if (modified) { |
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.
@ValJed Unrelated to main pr, but i noticed array's isModified
is a function, not a boolean. The bug it was causing was that array modals always acted as if they had been modified and threw a confirm when exiting a clean modal.
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.
oh wow nicely spotted, wouldn't it be a better solution to use a computed everywhere or a function ?
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.
Question about strat.
const modified = typeof this.isModified === 'function' ? this.isModified() : this.isModified; | ||
if (modified) { |
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.
oh wow nicely spotted, wouldn't it be a better solution to use a computed everywhere or a function ?
That sounds right to me. I'm already doing too much in some of these PRs .. how would you want to move on a computed? Should i back out my fix and make a ticket for a better a solution? Or leave this and make the ticket anyway, knowing that this could change? |
@stuartromanek very sorry for that late reply never saw the mention. |
@ValJed It wasn't as involved to make the upstream change as I thought, so I've converted the array modal's |
Summary
isModified
method to a computed prop for consistency with other componentsWhat are the specific steps to test this change?
https://github.com/user-attachments/assets/b1e1f42d-982c-4b13-ba12-4552dae470b3
Tests
https://github.com/apostrophecms/testbed/actions/runs/12794762166
What kind of change does this PR introduce?
(Check at least one)