ix
ix copied to clipboard
Allow padding for IxGroupItem
Prerequisites
- [X] I have read the Contributing Guidelines.
- [X] I have not leaked any internal/restricted information like screenshots, videos, code snippets, links etc.
Suggestion / feature request
In previous version of iX (v1.6.3), we used to style group items to emulate "nesting" for 3rd level of group items. After migration to v2.1.2, this is not possible anymore.
The only workaround would be to add non-breaking spaces in the beginning of group item text, but this doesn't affect the icon, which remains in it's place.
Is there any way how to achieve this, or would it be possible to implement some solution for this use case?
Previous (suitable) behavior:
Current (broken) behavior:
Further, we used custom styling for secondaryText inside group item, which is also not allowed now - but I understand the way you chose and this is minor issue we can live with.
Thank you for consideration...
// sample code how we achieved desired behavior
<IxGroup header="Group header" subHeader="Group subheader">
<IxGroupItem text="Group item 1" secondaryText="Secondary" icon="controlled-device" />
<IxGroupItem text="Group item 2" secondaryText="Secondary" icon="controlled-device" />
<IxGroupItem text="Group subitem 1" icon="battery-half" style={{ paddingLeft: "3.75rem" }} />
</IxGroup>
Hello @tomas-reznak, thank you for your question. The group was not designed to handle deeper nested items. In order to model more than one level the tree view should be a good fit. Is there a specific reason you are not using the ix-tree for your use case?
Hi, main reasons why we don't use tree view
now:
-
group
components visually fit our needs -
group
components have some nice features which we would have to implement intree view
by ourselves (such as "selection" mark on the left, icon/header/subheader layout). - we don't need deeper nesting than 3rd level (which we used to solve by padding which I mentioned)
We can give it a try, if we can achieve similar look as for group
component.
Hello @tomas-reznak, did you evaluate the tree for your use case. Can we close this issue?
Hello, no, we didn't try tree for this purpose - it was a minor issue which we didn't want to spend more time on. You can close the issue (unless you would want to improve group component :-).