You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 21, 2025. It is now read-only.
Too much code, e.g. when comparing to Vaadin screens (Entity entity = table.getSingleSelected())
It's not obvious that selected entity should be taken from items of useEntityList hook. Before found items of , I tried to use entityList and listQueryResult {data}
It would be nice to provide shorter API.
Example of usage:
function isDeactivateButtonDisabled() {
let selectedEntityId = entityListState.selectedEntityId;
const user = items?.find(i => i.id === selectedEntityId);
let currentUserName = mainStore.userName
return user == null || !user.active|| user.username === currentUserName
}
//...
<Button
htmlType="button"
style={{ margin: "0 12px 12px 0" }}
disabled={isDeactivateButtonDisabled()}
onClick={handleDeactivateBtnClick}
key="deactivate"
type="default"
>
<FormattedMessage id="users.deactivate"/>
</Button>
To get currently selected item in browser screens (table, cards) I should write the following:
Problems:
Entity entity = table.getSingleSelected())itemsof useEntityList hook. Before founditemsof , I tried to useentityListandlistQueryResult {data}It would be nice to provide shorter API.
Example of usage: