sap ui5 force selection is not working with true false condition - sapui5

forceSelection="{= ${item>/type} !== 'DataPlane' ? false : true }". this makes force selection false when it is dataplane but it does not make it false when no dataplane(or the condition fails)

Related

how to select a row in ag-grid react when clicking an icon rendred by ag-groupCellRender

I'M using the ag-grid react rowSelection={"single"} it works fine but when try the select a row from the fist field of the column that has an icon rendered by ag-group-cellRender it doesnt't select the row
enter image description here
`
<AgGridReact detailCellRenderer={'detailCellRenderer'} masterDetail={true} isRowMaster={isRowMaster} rowSelection={"single"} detailRowHeight={270} editType={'fullRow'} tooltipShowDelay={500}
onGridReady={onGridReady} rowData={rowData} suppressClickEdit={true} rowClassRules={rowClassRules} pagination={true}>
``
<AgGridColumn headerName='Line Item' headerTooltip="Line Item's name" headerClass="greyHeader"
field='Name' tooltipField='Name' cellEditor='lineItemEditor' cellRenderer="agGroupCellRenderer"
cellClass={cellClass} resizable={true} minWidth={150} flex={1}
editable={editable == "addLineItem" ? true : editable == "editLineItem" ? true : editable == "addChangeOrder" ? true : editable == "editChangeOrder" ? true : false} />
t`

Change fadeAnimation option after creation of the map

I know how to set fadeAnimation to false at the creation of a map :
map = L.map('map', {
fadeAnimation:false
});
But I'm looking for a way to set fadeAnimation true or false, on demand, AFTER the creation of the map.
map.options.fadeAnimation = false doesn't work.
Thanks a lot !
Change the _fadeAnimated property:
map._fadeAnimated = false

Only show a property in inspector when multiple other properties are set

I want to only show a property in the inspector when multiple other properties are set, like:
'Example.Example:Content.Whatever':
properties:
prop1:
type: boolean
prop2:
type: boolean
prop3:
type: string
ui:
inspector:
hidden: 'ClientEval:node.properties.prop1 ? false : {ClientEval:node.properties.prop2 ? true : false}'
This example doesn't work, but maybe it explains my intention.
The official neos docs only have an example for 1 condition which works but is not enough.
You made it almost. You have just to use && to combine it in your if statement
This will hide the element if the other two properties are true:
test:
type: boolean
ui:
label: 'test dependent hidden'
inspector:
group: general
test2:
type: boolean
ui:
label: 'test2 dependent hidden'
inspector:
group: general
hideMe:
type: boolean
ui:
label: 'hideme dependent hidden'
inspector:
group: general
hidden: 'ClientEval:node.properties.test && node.properties.test2 ? true : false'

Switch between editable and non editable mode in ag-grid

I am using ag-grid to display and modify data.How Can I switch between editable and non editable for the hole ag-grid. Can I do this with the grid api.
this is my default config:
this.defaultDefs = {
suppressMovable: true,
enableColResize: true,
editable: true,
};
Can I change editable dynamically?
editable can be either a boolean as you have it, or a function
If you use the function form you can determine on a cell by cell basis if you want the given cell to be editable
editable: function(params) {
return true; // true/false based on params (or some other criteria) value
}
you can set editable property by your way just create another function isEditable(columnName) which will give you boolean result.
this.defaultDefs = {
suppressMovable: true,
enableColResize: true,
editable: isEditable(column),
};
Do a logic check in the cellEditingStarted callback, calling the stop() when the check fails. You may need to write some css to style it or add a toast/notification to give the user feedback on why they're not able to edit.
You can use it like this:
editable: (params) => your logic
update your date
call api.redrawRows({ rowNodes: [node] })
You can also use suppressClickEdit in the grid options for a quick disabling:
gridOptions: {
suppressClickEdit: true | false,
...
}
See: https://www.ag-grid.com/angular-data-grid/cell-editing-start-stop/#no-click-editing
A simpler approach
editable: (params:any)=> params.data.isEdit === 'edit' ? true : false
add it to the columndefinitions
*
Note: isEdit === 'edit' is your custom logic
*

Tinymce resize vertical only

Is there anyway to force tinymce to resize vertical only? It breaks my layout when resized horizontal.
So that this works the same as a default textarea resize: vertical;
tinymce.init({
selector: 'textarea', // change this value according to your HTML
resize: true
});
resize option has 3 values:
false: to disable.
true: enable only Vertical resize
'both': enable both resize directions
check the Documentation
IMPORTANT NOTE: to make it work you have to enable the statusbar option, it's enabled by default, but in case if turned it to statusbar: false you will have to re-enable it statusbar: true
you can use:
tinyMCE.init({
// other stuff...
theme_advanced_resizing : true,
theme_advanced_resize_horizontal : false
});