Skip to content
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

AG-Grid should be able to interract with fusion compact mode #968

Closed
adukstad opened this issue Aug 31, 2023 · 2 comments
Closed

AG-Grid should be able to interract with fusion compact mode #968

adukstad opened this issue Aug 31, 2023 · 2 comments

Comments

@adukstad
Copy link

Is your feature request related to a problem? Please describe.
Compact mode has no effect on ag-grid.
Describe the solution you'd like
I would like the option to have ag-grid toggle density based on Fusion compact mode. Not sure the event from the compact mode toggle is exposed to us anymore (?)
Describe alternatives you've considered
Making our own implementation of compact mode and therefore bypassing the issue (but not working with the fusion compact mode)

@odinr
Copy link
Collaborator

odinr commented Sep 11, 2023

For now we don`t have a port for the "userconfig" from the previous FusionAPI, but there is a issue for persisting state in the framework, once that is complete, we can implement a user settings moudle

for now, this code will du what the previous hook did:

const settings = window['74b1613f-f22a-451b-a5c3-1c9391e91e68'].settings;
cosnt useCoreSetting = () => {
  const [state, setState] = useState(settings.core.toObject())
  useEffect(() => settings.core.on('change', setCoreSettings), [setCoreSettings]);
  return state;
}

const {displayType} = useCoreSetting();
if(displaytype === 'Compact'){
  ....
}

we will keep you updated, thanks for the suggestion

@odinr
Copy link
Collaborator

odinr commented Sep 26, 2023

should be done in equinor/fusion-framework#1258

@odinr odinr closed this as completed Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants