-
Notifications
You must be signed in to change notification settings - Fork 176
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
How to conditional colour a tab button #339
Comments
|
Many thanks, I know they are the right callbacks but what do I set to
override the tab colour so it changes when set in the callbacks? Nothing
seems to apply.
…On Thu, 22 Dec 2022 at 02:23, Eric Ho ***@***.***> wrote:
onRenderTab and onRenderTabSet will do the job for you
—
Reply to this email directly, view it on GitHub
<#339 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHNP4KR55JOEYLSY22FFBDLWOO3TFANCNFSM6AAAAAAQ436MR4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
@mattspeller you can use import { Actions } from 'flexlayout-react';
...
layoutModel.doAction(
Actions.updateNodeAttributes(
'node-id',
{
className: 'new-css-class-name',
}
),
) |
Amazing thank you
…On Thu, 22 Dec 2022 at 11:34, Eric Ho ***@***.***> wrote:
@mattspeller <https://github.com/mattspeller> you can use
import { Actions } from 'flexlayout-react';
...
layoutModel.doAction(
Actions.updateNodeAttributes(
'node-id',
{
className: 'new-css-class-name',
}
),
)
—
Reply to this email directly, view it on GitHub
<#339 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHNP4KXYW754EZVRZR64RDLWOQ4E3ANCNFSM6AAAAAAQ436MR4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is it possible to apply a classname programmatically to the tabnode so that the tab button (header) updates based on the classname provided. We have cases where data could be in error after initial render and want to update the colouring.
I am assuming it is something using updateModelAttributes but I can't find anything in discussions or documentation to perform something like the below:
node.getModel().doAction(
Actions.updateModelAttributes({ className: 'someRedClass' })
);
The text was updated successfully, but these errors were encountered: