-
-
Notifications
You must be signed in to change notification settings - Fork 227
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
Add item at the top if top button is clicked in list field #2055
Conversation
Pretty much title says it all. IMO it makes much more sense, that top button would add item at the top, because if list is long enough, you are not even seeing if something happens when item is added at the bottom. Created this PR because of [the question asked in forum](https://discourse.getgrav.org/t/blueprint-type-list-new-data-on-top-of-array/15254). So the solution would be either like this PR suggests, or button actions should be configurable via Admin config somewhere.
This is a bit of an impactful change to just merge in as is. The expected behavior would change and although I totally see your point I also think it’s a matter of preference and quite definitely contextual. Sometimes I might want it added at the top, sometimes at the bottom. I think a better solution is to introduce a Something like Can you make this change on both PRs? Also I didn’t test this so make sure you do. |
Add field `palecement` property check. If `top` or `bottom`, both buttons add item to top or bottom. If `position`, item is added depending on a clicked button position - if top button is clicked, item added to top and if bottom button - item added to bottom. Defaults to bottom
Added field If Defaults to |
Also updated Flex Objects plugin PR |
Created PR for docs |
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.
I like this thanks, I approve.
Pretty much title says it all. IMO it makes much more sense, that top button would add item at the top, because if list is long enough, you are not even seeing if something happens when item is added at the bottom. Created this PR because of the question asked in forum. Also created same change PR for Flex Objects plugin
So the solution would be either like this PR suggests, or button actions should be configurable via Admin config somewhere.