Skip to content

dynamically change menu side direction when change document direction #9526

Closed

Description

@BahgatMashaly

how to dynamically change menu side direction when change document direction?
i tried to change it manually by this code but it doesn't work
<ion-menu [content]="content" [side]="platform.isRTL()==true?'right':'left'">

also when use this code
<ion-menu [content]="content" [side]="direction" >
it doesn't work when change "direction" variable

thanks in advance.

Activity

  1. changed the title [-]dynamically change menu side direction with document direction[/-] [+]dynamically change menu side direction when change document direction[/+] on Dec 7, 2016
  2. BahgatMashaly commented on Dec 11, 2016

    @BahgatMashaly
    Author

    the problem related to file:
    "/node_modules/ionic-angular/components/menu/menu.js"
    in the function

    Menu.prototype._getType = function () {
    if (!this._type) {
    this._type = MenuController.create(this.type, this, this._platform);
    if (this._config.get('animate') === false) {
    this._type.ani.duration(0);
    }
    }
    return this._type;
    };

    we can comment “if condition” but it will recreate type every time so we can keep if condition and reset this._type when change menu side direction “i don’t know how do do this”

    also we should use this code when change the direction

    SV.menu.getMenus()[0].side="right"
    SV.menu.getMenus()[0].setElementAttribute("side","right");

    hope to fix it in the next version

  3. AmitMY commented on Apr 7, 2017

    @AmitMY
    Contributor

    @brandyscarney I see you are tagged here. Is this in the visible future roadmap? (it's important adding the middle eastern locales)

  4. jgw96 commented on Apr 7, 2017

    @jgw96
    Contributor

    Hello, thanks for using Ionic! We really appreciate this feedback on RTL support. This is not currently high priority for us at the moment, but we are tracking it in #5035. Because of this I am going to close this issue as a duplicate of that issue and ask that you put your feedback on that issue. Please know that by me closing this issue I am not saying that your feedback is not important, or that RTL support is not important, but I am simply closing this issue as we like to keep our issues as organized as possible so things do not get lost in the weeds (which is better said than done haha).

  5. ionitron-bot commented on Sep 2, 2018

    @ionitron-bot

    Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

  6. locked and limited conversation to collaborators on Sep 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions