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: support editing listbox title #1161
Conversation
apis/nucleus/src/components/listbox/components/EditableTitle.jsx
Outdated
Show resolved
Hide resolved
Does it also work with keyboard navigation in general? Unit tests? |
There is no support for keyboard navigation in Edit mode. |
Won't this be pretty strange in a mashup? Quickest way to get it working would be to pass in an option from the filterpane to enable the behaviour (and not document it to begin with). |
|
@@ -237,6 +238,13 @@ function ListBoxInline({ options, layout }) { | |||
containerPadding = layoutOptions.layoutOrder === 'row' ? '2px 4px' : '2px 6px 2px 4px'; | |||
} | |||
|
|||
const TitleComponent = constraints?.active ? ( |
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 need also be a check of permission if the user has can do setProperties on the object
@@ -78,6 +79,7 @@ function ListBoxInline({ options, layout }) { | |||
calculatePagesHeight, | |||
showGray = true, | |||
scrollState = undefined, | |||
isInSenseClientAndAlowEdittingTitle = false, |
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.
isInSenseClientAndAlowEdittingTitle = false, | |
isInSenseClientAndAllowEditingTitle = false, |
isInSenseClientAndAlowEdittingTitle && constraints?.active ? ( | ||
<EditableTitle layout={layout} model={model} /> | ||
) : ( | ||
<Title variant="h6" noWrap ref={titleRef} title={layout.title}> | ||
{layout.title} | ||
</Title> | ||
); |
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.
A Tobias asked: Will the filterpane check app permissions?
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 discussed about this and see we don't need to check since we do not support filter pane in storytelling which is the case we concern.
Motivation
To fix qlik-oss/sn-list-objects#158 by checking constraints.active. If it is true, it means we are in edit mode so a listbox label can be edited.
Requirements checklist
yarn spec
When build and tests have passed: