How to hide the display value in the column of Dojo dgrid? - dojo

We are currently using a tree grid of dojo dgrid. The expanding arrows of tree grid are placed as first column. This first column is mapped with a attribute in the store.
Currently the value of that attribute is getting displayed along with the expending arrow. But our requirement is to hide the value and display only the arrows.
Can anyone suggest a way to configure this requirement in tree dgrid column?

Tree's logic for rendering expand icons attempts to piggyback off of any existing renderCell function for the column in question. By default, dgrid renders the value pertaining to the field each column represents, but you could easily override your expand icon column to have an empty renderCell function (i.e. renderCell: function () {}), and then Tree would simply add the expand icon to an otherwise empty cell.

Related

Vuetify v-data-table within v-data-table: content in extended-item slot malfunction

in a vuetify table i do not want to show some headers and their corresponding column. Instead, I want them to be displayed in a table in the extended-item slot. The items of the table are completely user editable. This all works fine too.
The problem is that in the extended-item slot not only the properties of the selected item are displayed, but the properties of all items.
In the vue-dev-tools it is displayed correctly. I think I'm missing something fundamentally simple here. Does anyone have any ideas?
Thanks in advance
Here is the link to the sandbox: v-data-table in expanded-item slot of v-data-table, user editable
You can do it changing :items="tabItems" by :items="[item]" (i put inside array because one item alone is not legible by :items v-data-table.
If you call tabItems you will iterate over all items again so its better to use filtered expanded-item item instead do hard work manually.
I tried in your sandbox, you can change line 54 with my suggestion and you could check that its working well.

How to deselect the first PivotItem in Pivot Office UI Fabric React

How to deselect the first PivotItem. I am displaying A to Z pivot item and currently its always selecting first letter A. Could you please tell me how to deselect the first element? Thanks!
I want to use getStyles property interface. But not sure how to override. any samples would be great. Thanks
getStyles?: IPivotStyles;
If you mean by deselecting first PivotItem selecting a specific one you always provide by yourself vs selecting the first one in the list, then there are several props on the Pivot allowing you to do that. Here you can see all of them listed as props on the component. By default, if none of them are provided you will get the first PivotItem selected on render. In here you can see a demo of using the initialSelectedKey prop.
There is no way to deselect them all as Pivot needs to know what to render when it mounts.
As for the getStyles usage, I believe you are using Fabric 5 because in Fabric 6 the prop was renamed to styles and it can take a style object or a style function that returns a style object. In the same codepen, you can see how I changed the color of the links by passing a style object.

how to display multi level menu using ListViews

I have a set of multilevel data to be display using abovementioned component. Usually in PHP I simply iterate the data to display it as li but coming from web background, I just can't put it all together when using react-native. What is the right way to display a set of menu
FYI, I'm also using react-native-router-flux to manage the router.
If you want to build you own menu, you'll have to customize the renderRow of your ListView. If you take a look at RN's official doc on ListView here, it shows that you can specify a sectionID, for example.
You can then specify how each row renders.
renderRow: function (rowData, sectionID, rowID, highlightRow) => renderable
Takes a data entry from the data source and its ids and should return
a renderable component to be rendered as the row. By default the data
is exactly what was put into the data source, but it's also possible
to provide custom extractors. ListView can be notified when a row is
being highlighted by calling highlightRow(sectionID, rowID). This sets
a boolean value of adjacentRowHighlighted in renderSeparator, allowing
you to control the separators above and below the highlighted row. The
highlighted state of a row can be reset by calling highlightRow(null).
Another option is using open source modules built by the community.
The one closest to your needs I could find is : https://github.com/jaysoo/react-native-menu

Dojo dijit tree hide expand icon

I've got a dijit Tree which is populated via a store wrapped in Observable, essentially the example here: http://dojotoolkit.org/reference-guide/1.10/dijit/Tree.html#id7 (Not that the example actually runs from the dojo site though: unless that's just my browser).
It's working well and I can expand and collapse items. However, it displays an expand icon even for the last item in a hierarchy - i.e. an item that doesn't have any children. When you try and expand such an item, it seems to realise this and the expand icon then disappears.
Does anyone know of how to supress the expand icons from appearing in the first place?
Thanks!
Implement the mayHaveChildren() method of the model:
Implementing logic here avoids showing +/- expando icon for nodes that
we know don't have children. (For efficiency reasons we may not want
to check if an element actually has children until user clicks the
expando node)
This method inputs one of your items and outputs true if it can be expanded; false otherwise.

How to register icon images for contents of TreeViewer

I have a tree which is dynamic (where i can add and remove tree objects). And i want a specific icon to be displayed for a specific object.
How do i achieve this?
Use a label provider with a TreeViewer. For tree viewer this can be either ILabelProvider (single column) or ITableLabelProvider (for multiple columns). Return the image in getImage()/getColumnImage() method.