nativescript-community / ui-material-components

Monorepo that contains all of the NativeScript Material Design plugins.
https://nativescript-community.github.io/ui-material-components/
Apache License 2.0
215 stars 80 forks source link

ui-material-tab not showing in Svelte Native #359

Open nasiriyima opened 2 years ago

nasiriyima commented 2 years ago

Which platform(s) does your issue occur on?

-Android -Android versions

Trace.addCategories(DomTraceCategory); Trace.enable();

registerNativeViewElement("tabs", () => Tabs); registerNativeViewElement("tabStrip", () => TabStrip); registerNativeViewElement("tabContentItem", () => TabStripItem); registerNativeViewElement("tabStripItem", () => TabContentItem);

3. Try to use the component like so:


After doing all the above, the page appears blank in the emulator. By the way I am new to svelte native, so I am definitely sure I am missing something.
farfromrefug commented 2 years ago

@nasiriyima the tab component might be needing a special svelte implementation. I think it was in svelte native when tabs were actually part of N. Can you go on discord in the svelte native channel (in svelte server) to discuss this?

nasiriyima commented 2 years ago

@farfromrefug Thanks for the input. Can you kindly share the link to the svelte native discord server to me. I will really appreciate it thanks!

farfromrefug commented 2 years ago

@nasiriyima https://discord.gg/VYzj972s

dolphin-dogs commented 2 years ago

For anybody who needs this component in svelte native : this code is working.

Just there is an inversion here :

registerNativeViewElement("tabContentItem", () => TabStripItem);
registerNativeViewElement("tabStripItem", () => TabContentItem);
registerNativeViewElement("tabStripItem", () => TabStripItem);
registerNativeViewElement("tabContentItem", () => TabContentItem);