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

Cannot get smartSelectInstance from Link component #3954

Closed
AydanGaite opened this issue Nov 4, 2021 · 0 comments
Closed

Cannot get smartSelectInstance from Link component #3954

AydanGaite opened this issue Nov 4, 2021 · 0 comments

Comments

@AydanGaite
Copy link

  • Framework7 version: 6.3.1
  • Svelte version: 3.37.0
  • Platform and Target: Chrome Version 95.0.4638.54 (Official Build) (arm64)

Describe the bug

I cannot call smartSelectInstance from the Link component, as it is undefined.

To Reproduce

<script lang="ts">
let ref;
let smartSelectInstance;

onMount(() => {
  // *This throws an error
  smartSelectInstance = ref.smartSelectInstance();
});
</script>

<Link
  smartSelect
  smartSelectParams="{{
    openIn: 'popover',
    closeOnSelect: true,
  }}"
  bind:this="{ref}"
>
   Select
   <select>
      <option>Test</option>
   </select>
</Link>

Expected behavior

I should get the smart select instance from the Link instance

Additional context

This is what the Link component looks like when it is initialized. There is no smartSelectInstance to call.

$$: {fragment: {}, ctx: Array(29), props: {}, update: ƒ, not_equal: ƒ,}
$destroy: () => { destroyComponent() onDestroy() }
$on: ƒ (...args)
$set: ƒ (...args)
$$set: (...)
badge: (...)
badgeColor: (...)
class: (...)
href: (...)
iconOnly: (...)
noLinkClass: (...)
routeProps: (...)
smartSelect: (...)
smartSelectParams: (...)
tabLink: (...)
tabLinkActive: (...)
tabbarLabel: (...)
target: (...)
text: (...)
tooltip: (...)
tooltipTrigger: (...)
get $$set: ƒ get()
get badge: ƒ get()
set badge: ƒ set(value)
get badgeColor: ƒ get()
set badgeColor: ƒ set(value)
get class: ƒ get()
set class: ƒ set(value)
get href: ƒ get()
set href: ƒ set(value)
get iconOnly: ƒ get()
set iconOnly: ƒ set(value)
get noLinkClass: ƒ get()
set noLinkClass: ƒ set(value)
get routeProps: ƒ get()
set routeProps: ƒ set(value)
get smartSelect: ƒ get()
set smartSelect: ƒ set(value)
get smartSelectParams: ƒ get()
set smartSelectParams: ƒ set(value)
get tabLink: ƒ get()
set tabLink: ƒ set(value)
get tabLinkActive: ƒ get()
set tabLinkActive: ƒ set(value)
get tabbarLabel: ƒ get()
set tabbarLabel: ƒ set(value)
get target: ƒ get()
set target: ƒ set(value)
get text: ƒ get()
set text: ƒ set(value)
get tooltip: ƒ get()
set tooltip: ƒ set(value)
get tooltipTrigger: ƒ get()
set tooltipTrigger: ƒ set(value)
[[Prototype]]: ProxyComponent
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

1 participant